Pull the gear position sensor off and give it a clean. Also clean the spring loaded post inside. I also gave a little squirt of WD40 in the hole the post comes out of. Fixed mine.
When you put it back on tighten the bolts just enough to hold it but allowing some small movement. rock it from side to side a little with key on and see if there's a spot where the light stays on better - if you get my drift. Tighten it up in that position.