I had an ex threaten me with that before. I got lucky and she didnt do anything though.

You need to just straight up tell the judge you do not want to be registered as a sex offender because you had sex with you gf who is 2 years younger than you. HE holds the power. You need to be as nice to the judge as possible, and since you have already confessed, tell the truth.