Sorry, but no. The KM did not put active sonar on U-boats, passive only. (They might have put active sonar on some of the very late "super-weapon" boats. I'm not certain.) So there is no way to ping for active range determination.
However, there is a passive technique for determining range.
http://lnpi.net/docs/the_four_bearings_method_v2.pdf
There are in-game and DIY tools to make this task easier, and at least one excellent youtube tutorial. Google to find them.