You need to know what the distance is. For now, just print it to serial when you have it.
Add this line to loop:
distance = responsetime / 58; // Distance calculation in cm
When you compile it, the compiler will complain about those variables, so add the code that declared them and does anything with them. Then other variables will be missing. Rinse and repeat until you get a clean compile. Post what you have then when it doesn't work.