Thank you. What you need to do is perform the calibration for the new sensor. It is listed below.
The brake pedal position sensor (BPPS) receives a low reference signal and a 5-volt reference signal from the BCM. Whenever the brake pedal is applied, the BPPS applies a variable voltage signal to the BCM through the stop lamp switch signal circuit. The BPPS calibration must be performed after the BPPS or body control module (BCM) have been serviced. The calibration procedure will set BPPS home value. This value is used by the BCM to determine the action of the driver applying the brake system and to provide this information to the vehicle subsystems via the class 2 communication bus.