Servo motor with a ultrasonic sensor

You need to remove the analogRead line. Then you need to know what values you are actually getting in distance_cm. Your Serial.prints will tell you that. When you have the minimum and maximum values THOSE are what you put in the first part of the map() command. The second part should be 0, 180 because that is the range of values that servo.write() takes.

Steve