I'd suspect the transmission position switch. It's easily accessible if you remove the shift lever handle and the console cover. Try disassembling it and cleaning the contacts and tracks with electrical contact cleaner. If that doesn't do it, it probably needs a new switch.