This should be fairly easy to correct. Our current law (RA 10172) allows the administrative correction of certain entries with the Civil Registrar, including sex of a person (if this was indeed an error). The petition is generally filed with the Local Civil Registry Office (LCRO) where the record containing the clerical error sought to be corrected is kept. However, if your residence or domicile is different from where the civil registry records are registered, you may file the petition in the nearest LCRO in your area.
My advice is for you to visit the LCRO in your area. They should be able to provide you with the forms and checklist of documents you should produce to complete the petition. As I said, this is fairly easy... takes some time and leg muscles to complete though. Hope this helps.