The brake light switch is under neath the dash very near the brake pedal lever. It is pretty easy to replace. As for the flashing D4 light TAKE YOUR CAR BACK TO THE DEALER, THEY DID NOT PERFORM THE REPAIR CORRECTLY!!! or THE DID NOT DIAGNOSE THE PROBLEM CORRECTLY IN THE FIRST PLACE !! The speed sensor should not have caused your D4 light to flash. This means that there is code in your transmission. Was it flashing before? Insist that the DEALER re-do their work. I have to re-do dealer work every day. Just because they are the dealer, does not mean they walk on water. They are still guys with tool boxes fixing cars who are human and make mistakes.