There is a switch behind the brake peddle that releases the shifter to come out of park when the brake peddle is pressed.

I suspect that part has failed not the shifter itself

Sent from my SM-G981V using Tapatalk