When you unplug the sensor like that with the key on, you get something called bias voltage. Without boring you with the details, that 5 volts USUALLY means nothing, other than the fact that your wiring integrity back to the PCM is good. You need to test the signal wire with the connector plugged in and either backprobe the connector with a Tpin (I recommend) or, you could pierce the wire. Then, you'll get a true signal voltage. With it backprobed and key on, you'll be able to move the throttle by hand, and see the voltage change on the signal wire due to the resistance in the TPS sensor.
Addressing the USUALLY in the above paragraph, there is a chance that the 5 volts that you're signal wire is reporting is because it's shorted to reference voltage. But you can't properly test that with it unplugged. If you plug it back in, backprobe it, and are still getting 5 volts on two of the wires, you've got a short to voltage either by two bare wires touching, a shorted sensor, or a bent pin at the PCM.