Gear Shift stuck.sometimes

Okay so it just started today but when i turn my car on my gear shift won't move out of park. I followed the manual to get it unstuck (pressing on the breaks and putthing the emergancy break on) and it worked. The next time 2 times after that it worked perfectly fine. The 4th time… It got stuck again. Everything else works on my car. Brakes, lights, runs smooth, no noises. Anyone know what it could be and if so how much i'm looking at getting it fixed? I have 1996 honda civic with low millage.

Shift lock solenoid or switch on the brake pedal support arm.

Go to a mechanic