Hi,
Looking down over the back of the battery, you will see the top of the gearbox. Look for a rubber gaiter on the gearchange selector cable. There is a bracket holding the selector cable in place and the socket is attached to that bracket. The wires come from the engine wiring harness to that plug socket that the sensor wires connect to. I've added a pic from the Haynes car manual that show the bracket.
Many thanks