Hello and thank you for writing to us. My name is ***** ***** i'd like to help you. I am wondering, has it ever happened to you in the past where a thought got stuck in your head like this and you found yourself "obsessing" over it? There is a condition called Pure-OCD which involves us having intrusive and unwanted thoughts. The harder you try to analyze them, stop thinking about them, convince yourself they are wrong, etc., the stronger they can become. Thoughts about being gay are one common obsessive thought that some people have and it leads to people feeling very confused, frustrated and upset because their brain is trying to convince them of something that isn't actually true. Here is an article that addresses this. https://iocdf.org/expert-opinions/homosexual-obsessions/. If you look up OCD and "thoughts of being gay" or similar searches, you should come upon stories similar to yours that show you that others suffer with these unwanted thoughts and they are only thoughts and do not actually mean anything about your sexual orientation regardless of how much they force you to question it.
If you do see glimmers of yourself in these blogs and articles about OCD, then there is help. Exposure and Response Prevention is a therapy that will take you up close and personal with these thoughts in a way that is controlled and essentially depowers them. Through this, you can learn to mostly ignore thoughts that come as they are only thoughts and do not necessarily need to wreak havoc on your behaviors or emotions. ERP can help get these thoughts under control. As another strategy, you could talk to your doctor about a medication that may help lessen these thoughts. SSRIs (antidepressants) are the firt line treatment for OCD and can really help with the ruminations. Potential therapists can be located here and can hekp with diagnosis, ecploration and teratment ... https://therapists.psychologytoday.com/rms/?tr=Hdr_SubBrand
The key here is to recognize that the thoughts that you are having are only thoughts. They don't mean much as we have very busy and active brains and the harder we try to avoid thinking about something, typically, the more stuck that thought becomes. Also, sexuality, especially at a young age, is very fluid. Being aroused watching girls does not imply you are gay. You said point blank in your statement you are straight and you have been in a stable and healthy relationship with a guy for a year and a half. That is what leads me to believe these intrusive thoughts may be a component of OCD which is a treatable condition, often through therapy and/or meds.
I hope this helps explain a potential reason why you are stuck with this thought about being lesbian. OCD is a tricky and manipulative condition that has the knack of honing in oh some of our biggest fears. That is why it makes further sense that the more committed and "future-oriented" you become with your boyfriend, the more your OCD is trying to confuse you.
Let me know if you have additional questions - I am here to support you,