In general, the law does not require employers to treat all employees equally. However, the law does prohibit employers from treating employees differently if the reason for such disparity in treatment is a legally protected trait. Gender is a legally protected trait, so if you could prove that the reason you were fired and your manager was not is because you are female, then you may have a claim for discrimination. The thing is, this is not automatically proven simply by the fact that you were "terminated" and your manager was not. There could be other reasons which explain why you were treated differently. For instance, your manager might not be as easily replaceable, you might have been perceived to be the initiator of the sexual encounter and thus more culpable, or you might have had prior issues with your performance whereas the manager did not. Basically, in a gender discrimination case, you would bear the burden of proving that you would not have been fired if you were not a woman, and that all of these other potential explanations for why you were terminated were not factors. This can be a hard burden to satisfy, but it is certainly not impossible.
Given all the above, it may be prudent to file a complaint with The New York State Division of Human Rights. They will investigate and if they find that your discrimination claim has merit, either file a lawsuit on your behalf or, more commonly, issue you a right to sue letter authorizing you to file your own lawsuit in civil court. Filing a complaint with the Division of Human Rights is free and does not require you to have an attorney (though you certainly can), so there really isn't much to lose.
I hope that this addresses your concerns. If I can clarify anything at all, just let me know. If I have answered your question, I would very much appreciate a positive rating of my service so that I may receive credit for assisting you.
Very best regards,