From your original post, it sounds as if the brake light switch is working. Just to cover all the bases, you might check the fuses that apply to the brake lights and maybe a separate one for the shift lock mechanism.
If you don't have an owner's manual to show you the fuse numbers and locations, you can download a manual, once you register (free) at the Toyota Owner's site:
www.toyota.com
Click on "Join now," enter VIN
My Vehicle: Car original specs and service history (dealer service done)
Parts & Services: Maintenance Schedule
Resources: Manuals and Recalls
If the fuses are all good, check to see if the solenoid/shift lock is trying to work. With the key in Run but engine off and your foot on the brake, can you fully depress the chrome pushbutton at the top of the shift lever? Is there an audible click in the dash or console when you do this?
If it won't depress more than halfway in and there's no click, you probably have either a wiring problem to the shift lock control unit (mounted in the console) or a problem with the control unit itself.
If it does depress all the way and there's a click, then something mechanical is wrong between the shift lever and the transmission selector (mounted on the side of the transmission and turned when you move the shift lever.) There is a bushing at the base of the shift lever that causes problems for Toyota automatic transmission owners... but that's usually a sloppy lever and/or difficulty in starting, because the sloppy lever doesn't move the transmission selector to P or N, thus disabling the starter.
If you have a small cover at the top left of the trim plate where the shift lever is, you might have a manual lock-release under the cover. You have to pop the cover off with a padded screwdriver or small trim panel remover. (I don't know the Gen1 Avalons... we have one of these access holes on our 03, but I don't want to pop it off to see what's under it because it's 23F and I don't want to break the plastic.) There's no problem activating the manual release if you have one, but of course you have to use it every time after you've put the car in Park.