I'm thinking of leaving the country to go to a new school because I committed a sexual act with a minor.
Wow that's pretty serious. Are you in trouble with the law?
Yes, it was illegal because he was a minor.
You broke a serious law which is beyond bad. Not only will you have to register as a sex offender but you will likely going to spend time in jail. The minor is going to speak up and they will track you down even if you leave for another country.
I'm worried. I'm so sorry. What should I do?
You should take responsibility for what you've done, not flee the country. You may not be able to leave at this point anyway.