Equal Protection jurisprudence does NOT protect a group just because it's a group --- the group must have a special status that the Court recognizes as requiring special protection, which means discrimination on the basis of race primarily, although women get an intermediate level of protection.
Discrimination against gays only requires a "rational basis" to meet the requirements of the Equal Protection Clause.
Meaning -- there is a rational basis to distinguish banning homosexual buggery because it is historically morally offensive.