Not the father after 14 years!

My ex-wife and I divorced two years ago and I was awarded custody of my two girls (14 and 12). The oldest daughter has been getting into some trouble in school and she doesn’t like the rules so now she wants to move in with her mom. I have been fighting this because it is not in her best interest to move back to a bad environment with her mother. Now my ex drops a bomb on me and tells me that I am not her biological father. First of all I am heart broken as you can imagine. My ex wants custody back and my oldest wants to move out. What are the legal issues with this? If I am not the bilogical father do I still have visitation? How about child support? How about any say in her life? Thanks.