Welcome to AF.
Could be a couple things here.
It could be the brake/Tran shift interlock(btsi) solenoid.
If it was clicking in the dash then I'd assume it has power.
Does it shift without pushing the brake?
Check down around the pedal and see if anything is loose,
like the brake light switch.
I'm not certain where the BTSI is located, I thought it was in the console area by the shifter.
Here are some direction to
open the console.
I'm pretty sure its the BTSI solenoid though.
hope that helps.