Yes, it is a sin.
For this reason God gave them up to vile passions. For even their women exchanged the natural use for what is against nature.Likewise also the men, leaving the natural use of the woman, burned in their lust for one another, men with men committing what is shameful, and...