The endstop connectors on the SKR 1.3 have a different pinout from your diagram. The pins, from top to bottom, are +5V, GND, SIGNAL while the connector in your picture seems to be GND, +5V, SIGNAL (assuming the connector shroud is in the same orientation so the connector in your picture is upside down from the SKR 1.3 layout).
Hopefully you haven't burned out anything by switching the +5V and GND connectors. Also, I don't think you need to connect the +5V for this circuit - just the SIGNAL and GND should be sufficient.