The pastor apparently said that according to the Bible homosexuality is wrong. I fail to see why that is an offense that deserves a jail term.
There has been some effort to reinterpret the Bible, but according to reasonable, traditional readings of it there are several passages which declare that homosexuality is wrong, sinful, and unnatural. You can disagree with that, but a Christian minister has a perfect right to say it.
Good as New Bible Complete with the smiley-face-stamp-of-approval from the Archbishop of Canterbury.