In any project, especially when you are starting, the debugging can be annoying and confusing. The trick is to do things one at a time, eliminating all the possible mistakes one by one.
1- Check if the circuit is powered up
2- Check from data sheet/internet that you have connected the pins (+5, Vout, GND) of the sensor correctly.
3- Without attaching the sensor to he controller, check if the output varies correctly if you place your hand / some obstacle in front of the sensor.
4- Connect the sensor to the controller and run a basic program that would read sensor values and in turn, turn ON or OFF an LED depending on the threshold distance/voltage reading you set
5- Integrate the sensor into your system by modifying the code accordingly
Remember, on step at a time and look out for datasheet for correct distance vs voltage curve and pin description