Dscan shows the distance only when the distance is already known.
You already know the distance to structures and the distance to ships on grid, so those distances will be listed in the Dscan window. Other distances are for you to find.
One trick to find an unknown distance is to scroll with big steps through the dscan distances while repeatedly using dscan. When you know a ship is somewhere between 5 and 10 AU, you can scroll in smaller increments until you find the ship is somewhere between 7.2 and 7.3 AU. Next, you open the Solar System window and switch between 7.2 and 7.3 AU dscan range, while having the anomalies shown. You now see two anomalies at that range, so you switch to 7.3 AU Dscan range with with an angle of 5 degrees, check both anomalies and see the Ishtar is ratting in the Blood Haven with signature DIU. You tell your fleet and you all warp to that anomaly and blow him up.
If Dscan automatically told you the distance, this would be a little too easy.