Long distance button
A workable way to do this is to use a pair of wires to the remote switch operating as a current loop. At the near end bias the current loop with a resistor to your 5V supply. The other side of the loop pair would go to the anode of the LED in an optocoupler. Cathode of the coupler LED to GND. Output side of the optocoupler can go to trigger your device. Select the resistor to allow about 10mA to flow in the current loop when the switch is closed.