I would check the shifter cable where it connects to the transmission. Maybe the cable is bound or something is jammed, etc..
Just a suggestion. I just got my Ranger so I don't know the trans that well. Maybe someone that knows it well can chime in. Once in drive does it drive normal or is it still acting up?