Hi, my name is***** sounds like there is a fault with the electronic gear selector or the brake light switch. The brake light switch has a separate circuit that tells the shifter to unlock when you press the brake pedal. Since you are able to move the shifter out of park and into drive I suspect that the switch is working and the problem is in the shifter but the brake light switch should be checked or replaced first.
Let me know if you have any questions. Please rate my service in order for the website to credit me for answering your question.