Acura with locked shifter

My 99 Acura TL shifter at times locks up. There is a button you can access with a screwdriver to manually release it, so it is n a great problem, but I want to fix it. Is this a brake pedal sensor or a transmission solenoid? Hoiw hard is it to locate and fix?
I am just trying to get some idea of what I may be geting into before I jump in.
Thanks.

could be either. Most likely the brake pedal sensor though.

Any idea where the sensor would be located?

If it was the brake pedal sensor (brake light switch) then your brake lights would not be working.

It is your brake light switch that sends a signal to the shift solenoid in your console. Try this…remove your shifter and the surrounding plastics so you can see the shifter mechanism. Somewhere there you will see a solenoid that trips a little lever to unlock your shifter. MANY TIMES…people spill a soda in the shifter area…or maybe a prior owner does… It takes a long time for the soda to evaporate into a glue like substance…but when it does it can gum up the works for the solenoid… See if you see any gooey stuff in there as well. Could be as simple as spraying the solenoid with WD-40 and cleaning it up… Solenoids are pretty reliable. You should hear a subtle click when you have the Key on…engine off and you step on the brake pedal…see if you hear the solenoid “trying” to unlock the shifter…if you do…then I bet it needs to be cleaned and Lubed up.

If you brake lights work then that solenoid should be getting the signal…check the fuses too…pretty certain its fused…