Depending on what the shape of the treadmill is (could you provide a picture?) you could use the LEDs by making diagonal lines between the side bars and the floor of the treadmill.
Something like this:
where red circles are IR LEDs and green circles are receivers or vice versa, with some logic work should give you the control over the position of the dog.
You will have some interference between the LEDs but you can use modulation or some form of synchronization to deal with it.
This is actually harder than it looks to get repeatable.
I would not recommend hall effect sensors for this application. Their sense distances are generally small, meaning that the mounting of the sensors and magnet need to be done with some precision. You will find it very challenging to align all of the halls to work consistently and under all operating conditions.
The transmission will move on its compliant mounts as a function of engine torque. If you're dealing with a top-loader transmission, the shift lever will also move relative to the body as a function of engine torque, making it almost impossible to obtain repeatable measurements.
Edit: The OP has a top-loader style transmission, where there is no external linkage to take advantage of. For any other transmission, there is external linkage between the shifter and transmission housing - usually rods or cables.
For a top loader: I'd recommend X and Y axis potentiometers on the shifter, with the pots mounted to the transmission (not the body), which should be accessible through the floorpan opening that the shifter comes up through. You'll need to decode the analog readings from the two pots to match gear selection.
For any other transmission: I'd recommend using a sealed potentiometer used as a voltage divider connected to each shift linkage (under the body, not inside the transmission). You'd then do the calibration + windowing in your firmware, where it will be easier to tune. If your transmission has multiple linkages, it essentially de-muxes some of the multidimensionality out of the shifter for you, again making it easier to map discrete gears to analog voltage ranges.
Reverse is easy--just tap the back up light circuit.
Best Answer
Aside from Hall sensors mentioned in the comments, there are two widespread types of proximity sensors which may have the range you need:
Ultra-sonic sensors provide good range and coverage (think of car park-aid systems) but they usually have a minimum range which is too big for your purposes. Laser-based sensors only cover one particular direction, but are more precise. Infra-red sensors provide wider coverage. I believe you can find one which will suit you.
Depending on the circuit you need to build, you can choose a sensor with digital interface (I2C, SPI etc) or some sort of analog signal (usually PWM).