Why did He say that? Tell the whole story.
Here's your whole story.
"But Jesus went to the Mount of Olives. Now early in the morning He came again into the temple, and all the people came to Him; and He sat down and taught them. Then the scribes and Pharisees brought to Him a woman caught in adultery. And when they had set her in the midst, they said to Him, “Teacher, this woman was caught in adultery, in the very act. Now Moses, in the law, commanded us that such should be stoned. But what do You say?” This they said, testing Him, that they might have something of which to accuse Him. But Jesus stooped down and wrote on the ground with His finger, as though He did not hear. So when they continued asking Him, He raised Himself up and said to them, “He who is without sin among you, let him throw a stone at her first.” And again He stooped down and wrote on the ground.
Then those who heard it, being convicted by their conscience, went out one by one, beginning with the oldest even to the last. And Jesus was left alone, and the woman standing in the midst. When Jesus had raised Himself up and saw no one but the woman, He said to her, “Woman, where are those accusers of yours? Has no one condemned you?” She said, “No one, Lord.” And Jesus said to her, “Neither do I condemn you; go and sin no more.”
Jesus was making the Pharisees aware of their own sin. If we still lived under the law of Moses, we'd all deserve to be stoned to death. The reason homosexuals should not be executed is because we now live under a new covenant, where you have a chance to receive grace for your sins through the shed blood of Jesus Christ. Why is it ok for you to be allowed to receive grace and pardon for your sins, if homosexuals cannot?? God's mercy is not exclusive.