Most automatic cars have a switch that detects whether you've depressed the brake pedal before it allows you to shift out of park. My guess is that the switch, or the wires leading to it, are broken. You can spend a bunch of time trying to find a replacement switch, or you can bypass the switch and connect the two wires.