There are a number of things that would cause this. However, the likely cause is the park neutral switch is not allowing the key to be released.
Here is a guide that talks about this issue, but I think we need to jump the switch first:
https://www.2carpros.com/articles/ignition-switch-wont-turn-stuck
I am attaching the wiring diagram that will show this but what is happening, if I am correct, is the shift interlock is not allowing you to remove the key because the vehicle doesn't know that it is in park.
You are not able to turn the key all the way to the off position if the vehicle is not in park because it doesn't want the vehicle to roll off. So, if it is not in park, then the solenoid will not release the key and allow it to be removed.
I am attaching the info below but let's remove the connector and use a paper clip and jump the two terminals together and then try and turn the engine off and then remove the key.
Images (Click to make bigger)
SPONSORED LINKS
Saturday, June 4th, 2022 AT 4:31 PM