I think it is a bad shift solenoid. Normally, manufacturers would provide a solenoid by-pass just above the shifter. It is a tiny hole or an oblong covered with rubber or plastic.
You can pop the cover and then stick small screw driver inside the hole. Gently push it downward and then grab the shifter to put it on drive.
I am not sure on ford cars, but most cars are design with readily available by-pass button that can be slide up or down. If you see this anywhere around your shifter, you don't need to pry or pop open it, just push it with your index finger. Sometimes it is located in the shifter itself.
Good luck to you. I was trying to look for a picture of this online but for some reason, I could not find any.