Most likely the Trans Range sensor is failing. There are diagnostic steps for this but... simple things you can do is a visual inspection of the harness, trans connector and PCM connector. Correct any issues you find. Second is the shifter cable adjustment. Keep in mind that if the shifter is hard to move the manual lever might not be in the necessary position when in drive. Check the cable connection at the manual lever on the transmission and see if the lever is stiff when the cable is disconnected. Third is replace the TR sensor.