I fixed the stuck gear shift…
I fixed the stuck gear shift by disconnecting both batteries, waiting 20 minutes and reconnected them to reset the computer in the truck. That seemed to work and the truck shifted smoothly out of park
Someone else suggested pulling harder on the gear shift handle to get it out of park, especially if it is parked on a hill or backed up against the curb, which my 2017 Dodge Ram Diesel was. I don't recall pulling harder on the gearshift after resetting the computer by disconnecting the batteries, but I may have.