What your professor said was unkind and not true.
Homosexuals are just as loved by God our Father as anyone else. Having a same sex attraction is not a sin, in and of itself. Only sexual actions can be considered sinful — even lust that is kept in the mind and heart and deliberately dwelt on, but not physically acted on, can be sinful because it is a willful act. Jesus was pretty clear that a man who looks lustfully at a woman is guilty of adultery.
We are all called to chastity. That means living out our sexuality within the design of God's plan. Sex is a gift, but not a gift without a purpose. Sex is short for sexual reproduction. Reproduction is the objective aim of sexual intercourse, which is the summation of all sexual acts. Foreplay is only arousal to bring about this end.
While sex imparts great pleasure to us, that is only a secondary side effect of its purpose. Eating food generally tastes good, but it is for the purpose of nourishing the body. Even if we don't think about the nourishment, we consume the calories and nutrients to sustain our life. Sex, like eating, is purposeful in its design — to reproduce, and be pleasurable — because God is loving and good and designed it to be so.
Sometimes we are attracted to someone sexually even though we are not in a position to mate with that person sexually and fulfill the natural end for sex: intercourse (which sodomy tries to emulate but does not) and reproduction. This happens:
- between teenagers not ready for parenthood
- adults who find someone they are not married to attractive
- married persons attracted to someone other than their spouse
- those with same-sex attractions, and
- the list goes on.
God gave us a context for acting out our sexual instinct: married love that is open to the gift of life. Married, so that the couple will share a lifelong covenant to emulate God's undying love and be a sturdy shelter for their family. Openness to life is openness to God's providence and command, be fertile and multiply.
The essential fabric of reproduction requires a man and a woman, because their parts are complementary, each supplying what the other cannot so that the two can become one flesh. It just can't be done with two persons of the same sex, despite technological tampering with our essential nature. He made them male and female for this purpose.
Chastity is a call to love as God love's. To live out that response by harnessing our sexual energy for God's purpose, even when we don't get what we want in a temporal way. Some straight people never marry, some become celibate as a choice and sacrifice, or even for the sake of the kingdom as Jesus said.
If you channel your sexual energy toward loving others as Jesus loves, you will be as pleasing to God as any straight person ever was. A close friend of mine lives as a chaste gay man and has a beautiful life worth emulating. Though I love being married and my wife, I am sometimes jealous of his freedom and exuberance for living.
So, I would encourage you to avoid acting out sexual impulses that are outside of God's plan and seek his help in living chastely. You can do it. Many are living this way, as courageous witnesses to Christ.