I will be an optimist. Your gear selector in the car moves a cable which changes the position of the transmission range switch (a.k.a. neutral safety switch / PRNDL switch), probably on the top of the transmission. If the cable or some of its linkage has come undone then your gear selector will move, but the transmission will remain in Park.
If the car is sitting on any kind of grade and didn’t move when you removed your foot from the brake then it’s probably still in park. (Depending on the e-brake possibility noted by VDCdriver above).
You could pop the hood and try to get a look. The switch is probably down underneath of a bunch of stuff. Some are easily visible, some not so much, but they generally look about like the pic. The rubber accordion looking thing is a protective boot over the cable