Same thing happened to my 2019 Trail Boss. I decided to take a cheap alternative than a jumper or buying a replacement part.
GM part numbers for the Automatic Transmission Control (micro switch not sold separately) for about $140.
84797128
84800776
85565585
85515701
86564191 (Most Current)
I detached the micro switch and used a zip tie in case I ever want to return it back to factory. Some people have had luck by bending the lever a bit to get it to work more efficiently. I figured it would fail again so a cheap zip tie worked fine for me. Then I tucked it neatly.