Do you have access to youtube? If so, you could watch this:
https://www.youtube.com/watch?v=Vp7xmbtylqI
Although 'can' and 'can't' do have the same vowel sound in American English, and the 't' is not usually audible in everyday speech, there are other ways of understanding what the speaker intends. Remember that 'can' and 'can't' are never heard in isolation. You have to pick up clues from what you hear and see around these words.
1. Listen to the overall stress of the sentence:
'Can' is usually reduced to a very short, weak schwa sound, so 'I can do that' will generally sound like 'I c'n do that'.
Meanwhile, 'can't' is never weakened. When someone says 'I can't do that', the word 'can't' is stressed, so you hear the full, long form of the word.
2. Context and other non-verbal clues will also help. A generally positive of negative tone of voice, together with body language and whatever other words are around the sentence ( As in 'No problem. I can do that' or 'I can't do that. I'm too busy') will usually tell you whether the sentence is positive or negative.
You aren't alone: it's often impossible even for native speakers to distinguish between the two. Often you have to guess from the context. It is easier to tell them apart in standard UK English, where the vowel sounds are different: can't rhymes with aunt, and can rhymes with man. The problem is greater in US English, where the vowel sound is the same for both, rhyming with man.
It's not your fault that you find it difficult - we all do.