Daredevil's powers are derived from his enhanced senses. He can hear, smell, taste, and feel things more accurately than any regular human. But he can't see.
This allows him to do things like listen to conversations through walls, to hear the sound of a fist coming through the air, and to track heartbeats.
The ninjas counteract these enhanced senses by being VERY quiet.
Daredevil can't track the ninjas because they make no noise while fighting. Daredevil mentions that they even have the ability to block their heartbeats. It's not explained exactly how they do this- maybe some special ninja clothes, or through the power of meditation.
The only noise the ninjas make is when they use their swords. Daredevil can hear the swords slicing through the air, and he is able to fight them that way.
But the ninjas figure this out and stop using their swords, so Daredevil is mostly blind while fighting them. This makes them extremely dangerous to Daredevil. But then:
Daredevil starts tracking their breath instead. Although the ninjas hold their breath during a fight, they eventually have to breathe. So Daredevil waits for that to happen, and he's able to fight them again.
Edit: I think it's an oversimplification to call Daredevil's ability a type of sonar or echolocation. Sonar/echolocation requires the listener/viewer to emit a sound (radar uses radio waves instead of sound), which bounces off the object being "viewed".
For the most part, Daredevil isn't emitting any sound that then bounces off an object. He is just listening to the noises the objects make, and he can hear them better than we can. So he can hear an object falling through the air because of the sound it makes against the air itself. That's not echolocation or sonar.
Of course, Daredevil could use echolocation. Human echolocation is a real skill that real people use. So maybe he listens to the sound of his footsteps bouncing off of the environment, but that isn't how his powers are primarily portrayed in the show.
But even if he is using echolocation, the point stands that the ninjas are somehow blocking that ability. It isn't exactly explained how they're doing that in the show, but it is explained how Matt defeats them.