That passage was describing the sin of Samaria and judah rhetorically called Sodom. Sodoms sin was sexual immorality. Israel’s sin was spiritual immorality.
Letting Scripture interpret Scripture is always worth the effort.