When my parents divorced my Mom tried to turn me & my brothers against our Dad. It had the totally opposite effect.
I adopted my elder daughter (from my wife's first marriage) when she was about 3-1/2. When she was in her teens she learned of him. She wanted to find him and after she turned 18 she tracked him down and met him. The point here is that she never knew him, yet felt a need to find him. I say that to tell you that you will always be her Daddy.
How could she legally keep her from you for two years? It sounds like a little legal counsel may be in order.
Calm down, think rationally. You have to be in this for the long haul. Don't react emotionally to your ex's provocation. Be in control. And don't make the biggest mistake you'll ever regret.
It's a very pathetic person who uses a child to beat up a former spouse. Be bigger than that. Don't let her call the shots. Also, take advantage of every opportunity in every moment to bond with your daughter. That doesn't mean spoiling her rotten, because that will create problems of its own, but be her Daddy. Give her the hugs she needs, play with her, listen to her.
I hope this helps.