At 22, you are going through normal struggles about identity, sexual identity and who you would like to eventually partner with. Some people reach their personal conclusions about these things earlier, it’s true. But it’s also true that many people spend their 20s figuring it all out.
In your case, you are also probably struggling with an inner conflict between your sense of who you are and the values you were raised with. So yes, I do think this has something to do with your seeming inability to settle into a relationship. The unconscious (and uncomfortable) solution to that problem is to acknowledge attraction but not to be able to see it through. Unless resolved, that conflict can set you up for a series of break-ups that will leave you and your partners mystified and hurt. You deserve better.
I urge you to find a gay or gay-friendly therapist to work with to resolve that inner conflict. You do have plenty of time. With support and some practical advice, you can become free to love and be loved.
I wish you well,