Hello, and welcome to JA!! you have a couple of possible problems here. one being the ignition lock cylinder has a problem, or the shifter is causing a problem. here is some additional info from GM on this concern.
Various Concerns with Shifter and/or Ignition Key (Replace Shifter Assembly/Shifter Components or Ignition Lock Cylinder
Some customers may comment on any of the following concerns:
The shifter button may be sticking in the handle.
The pin that activates the micro-switch may have moved out of position ( This causes the micro-switch to fail to engage when the vehicle is placed in Park. If this condition is present, the customer will not be able to remove the key from the ignition.
Metal flashing left in the cylinder may cause a high effort to rotate the key.
The slider may be binding in the guides. This may cause the shifter to become difficult to operate.
Verify that the shifter button is inoperative by evaluating if the park pawl pin on the shifter assembly moves when activating the button. If the parking pawl does not move when the button is activated, the shifter handle will have to be replaced.
Verify that the micro switch is out of position. Replace the shifter assembly.