There is two wires on the top of the trans. If for any reason those wires are disconnected it will not shift.... I had the same problem on my 1997 dodge 4x4..
Check the throttle pressure linkage on the drivers side of trans under vehicle it is more than likely rusted tight . It would be the top lever on trans and it should move freely,if not pop it off sand the pivot ball apply a little grease to ball and put it back together. The trans should shift properly.