What you describe in that sentence is indeed sin. But that is not the same as opposite-sex attraction. Attraction is not the problem, opposite or same. It is what the individual does with that attraction.
Why would,nt it also apply to another of the same sex?
Of course it would apply. The problem is that equating attraction with lust is a category error. The kind of thing that leads to a complete denial of the worth of the human body (ala gnosticism). It is a profoundly Islamic concept that leads to things like treatment of women like a necessary evil.
You are attracted to food but the sin comes in what you do with that attraction. If it turns into an obsession and you fixate on cheeseburgers you have sinned. But simply because a cheeseburger whets your appetite it does not man you have sinned.
God created men and women and and all things beautiful. I can say that both Angelina Jolie and Brad Pitt are physically attractive human beings without doing anything more than recognizing God's handiwork. But if I were to take that to the next level via lust (toward either of them), I would be sinning.