This sounds like the shift linkage on either the shifter itself or the transmission range sensor/selector came off. This means your shifter is moving but the cable that it attaches to the transmission with is no longer attached so you are actually not changing gears on the transmission. This is why you can move it with the engine off because when you put the shifter in park, it is not going into park.
Here is the process to replace the cable. You probably do not need to replace the cable but this will show you where it is to attach it back in case it did come off. Either way, you need to inspect this cable because I am sure this is your issue.
Images (Click to make bigger)
SPONSORED LINKS
Saturday, November 2nd, 2019 AT 7:45 PM