True. This is part of the left-over hysteria from the 90s AIDS media crisis. HIV isn't a "gay disease," but, as you said, because of the higher risk of transmission of anal sex compared to vaginal sex, and quite possibly the less inhibited, more promiscuous sexual attitudes of gays, they're over-represented.
But it's a mistake to consider yourself immune to HIV as a straight person; it's spread like wildfire in Africa, parts of Eastern Europe and Asia.