Enable three servos, uncomment all three endstop_servo_nr defines. Upload the firmware and run the M280 command for P0, P1 and P2, moving the servo connection for each and find the one that works. Mine happened to be on servo 2 on the RAMPS. See this thread for further info on how I fixed mine: [forums.reprap.org]
.
.