There's too many different ultrasonic sensors out there. Please post a vendor link or datasheet for the one your are using.
Also , are you trying to say the robot is supposed to be programmed to TRACK NEAREST OBJECT AND FOLLOW IT ?
We need a cell phone photo of a hand-drawn sketch of the physical layout of the servo mounting . If possible top view and side view. What's the SITREP on the sensor and standard 180 degree servo ? Any testing done on that ? Any success ? We need to know
the status of these . Can you measure distance ?(yes/no) Where are you getting your code ? Can you rotate the standard servo ?