I don't know what to tell you from a legal standpoint. Your EAOS should allow you to get out. This set of orders shouldn't hold you over past that date, especially as it was your first set of orders. Be sure you don't take any bonus payments that might extend you on other terms.
If your personnel office can't help you, contact BUPERS. I hate to tell you, but you can't expect a physician detailer to help you, especially those types. They are not your friends. Try to imagine the sort of physician who chooses to become a detailer.
If that is not productive, submit a request for release from active duty through your command. The reason given is further professional medical training. Bird-dog that; make sure you keep aware of the progress of that request all along the way. Do this as early as possible.
If you get stonewalled, contact your legal office and at least get aware of your rights. I can't say they will likely be interested in an administrative matter, though. If that does not work, contact the SG's office. You can request mast if necessary. BUMED won't like that; they will treat you as radioactive. You can also contact your congressman and ask for an investigation if you are not successful there. I hardly need to tell you that if you get to this point that you need to keep very detailed records of your communications, written and oral, and a diary of your contacts. Lastly, if you cannot get anywhere and you think you are at risk for having your residency training contract offer withdrawn, hire a lawyer.
This is the type of crap for which the Navy deserves its bad reputation. And they wonder why no one wants their scholarships.