it's the usual toyota truck inconvenient pull out from the dash ebrake.
first, make sure the parking brake is fully retracting into the dash. Next: yes, there's a switch on it buried in the dash that might be bad or even just misaligned. If you can unplug it and the light goes out, it's the switch.
This video on youtube clearly shows the switch at about the 00:17 mark.Having this same issue, will you supply a clear photo of the 'switch' that is buried in the dash?