For starters, Assuming you are not pressing any of the switches with your fingers... You need to change:

Code:
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
Did you check that you can invert the declared state my pressing and holding a switch during the M119 ?