First of all, being gay and being a pedophile are two very different things. Participation in some same sex exploration while growing up is fairly common but, considering that you are still attracted to the males a few years later and indicated that you do not get aroused by females, there is a strong indication that you are most likely gay and that is not something that can be changed.
However, being attracted to “boys” is more concerning. There are many factors that play into the issue, such as how big the age difference is or whether there is coercion involved. Since you are almost an adult, you also need to be concerned that you could get into legal trouble if you were to have sexual interactions with someone who is still a minor.
I would suggest that you find a therapist who has specialty training with sexual dysfunctions. You may have to do some extensive research online and make several phone calls to find someone in your area who is qualified to help you, but there are many good therapists who can.
All the best,
Dr. Holly Counts