Is it electronic shift on the fly? I just had a problem with mine.
Turned out to be a simple relay under the hood. Next to power distribution box under the hood is 1 or 2 small hooded relay covers. 1 is for electronic shifing solenoid, other (if present) is for trailer tow package. There are 2 relays in each box.
Try changing these around and see if it then works. I took the trailer tow relays and swapped them for shift relays and it was fixed. (Same part numbers) If you don't have trailer tow package you would have to pick up relays to test with.