Put a volt meter on the "trans" fuse. If the power is steady from initial key "on" then the switch is likely NOT the problem. If it's flakey, it likely is the problem. Very common. This circuit is live any time the key is out of the "lock" position and controls the trans, speed sensor and speedometer.

Also, if the gear indicator "light" flickers...