What should I do?

Take it back to court. There is always room for negotiations. Custody/visitation isn’t final like a divorce is. I would present your information to the judge and request a modification. If you have primary custody, and the child is physically in your care, I can’t see why a judge would agree to enroll her in a school that is that much of a distance from her home.

Contact your attorney