I think we get it twisted when we combine the right to say whatever you want with the viability of the content of the message or dialog plus the venue inwhich we use to convey that message or exchange dialog.
In other words, was what this preacher said wrong? No.
Leviticus 20:13 - If a man also lie with mankind, as he lieth with a woman, both of them [men] have committed an abomination: they shall surely be put to death; their blood shall be upon them.
Similar wording is found in 1 Corinthines 6 -
9.Know ye not that the unrighteous shall not inherit the kingdom of God? Be not deceived : neither fornicators, nor idolaters, nor adulterers, nor effeminate, nor abusers of themselves with mankind,
10.Nor thieves, nor covetous, nor drunkards, nor revilers, nor extortioners, shall inherit the kingdom of God.
So, what this preacher said according to the word of God is correct.
Was where he said it wrong? According to the article he spoke in a public place which is not against the law.
Did how he say it violate the law? According to the police community support officer, the preacher allegedly "made the remark in a voice loud enough to be overheard by others". What what exactly does that mean? Was it as the preacher said that he had finished giving his surmon when he spoke with a passer-by and perhaps others overheard his quite, but casual conversation? Is that the wrong that was committed?
According to the article, "the Public Order Act, introduced in 1986 to tackle violent rioters and football hooligans, is being used to curb religious free speech." So, is it possible this preacher was being persecuted and this law is being used as a tool to shut him up?