Asking in what way does Oscar Wilde's use of the term "sins" in The Picture of Dorian Gray condemn a society that is rigid and heterosexist implies two anachronistic assumptions, the first being that the twenty-first century western notions of gender existed in the Victorian period and the second that a society that differs from our own is necessarily more rigid. While many Victorians had strong beliefs about sexual and moral issues, so do we. It is no more "rigid" to believe that sodomy is acceptable than to believe that it is not; both positions may be held in either rigid or flexible manners.
Wilde himself would not have used the late 20th century term "heterosexist" to describe social norms. He himself was raised a Roman Catholic, and returned to that faith before he died, after a brief period of youthful rebellion. Within Roman Catholicism, sodomy, as it would have been termed in the Victorian era, was a sin, and referring to it as such would have been normal usage.
Wild uses sin to refer to all forbidden desires, e.g. in "“You will always be fond of me. I represent to you all the sins you never had the courage to commit". He also uses it in its sense deriving from the precise mean of the Greek "hamartia" (Latin "errare") to mean a mistake: "“Humanity takes itself too seriously. It is the world's original sin. If the cave-man had known how to laugh, History would have been different.” He does not use the term exclusively to refer to sexual misconduct.