That which you pulled is the speed sensor, it senses every time a gear tooth passes by as it is a Hall Effect Sensor. Yes. there is a magnet in it, the gear tooth changes the magnetic field and it senses it. Counting the impulses over time is how the governor determines speed. It has nothing to do with the governor light. Now you will have to reinstall the speed sensor and it can be quite delicate to install. Too far and it will break, too shallow and it won't sense speed.
The switch you need to check has a single wire going to it. It grounds when the PTO is engaged.
You need to check out the transfer case and transmission interlock switches. The transfer case is linked to the shifter rod in the floor, remove the bezel and trim around the transfer case shifter rod, just a bunch of Phillips screws. Or you can go underneath.
The transmission interlock switch is under the hood near the steering column where the shifter rod connects to the transmission.
You need to follow the wiring diagram I have posted carefully. The PTO light should only be on when the transfer case is in neutral, the transmission in drive and the PTO pulled.