sensor data hangs when going through if/then statements

the serial monitor is showing the numbers fluctuate even when the distance is controlled, and remains the same. something with the sensor data is not giving consistent number readings, rather fluctuating readings despite your logic.