Swap the religion in question, relocate the setting to the Midwest, and dial back the clock two decades, and I could have found myself turning to a group like JONAH.

The church of my upbringing was proudly evangelical, deeply conservative, and unwaveringly fundamentalist. (For point of reference, they considered the big Southern Baptist church in town too liberal.) The Bible was strictly considered the inerrant word of God, and its edicts were to inform our every action in the world.

When I look back on the people with whom I worshipped as a child, I do so with no small amount of love and affection. They were generally kind-hearted, sincere people who wanted to make the world better, albeit according to their own interpretations. I may have come to reject almost everything they tried to teach me, but I cannot make myself despise them personally.

However, it cannot be denied that the church I attended growing up was virulently, poisonously homophobic. It was in a Sunday school classroom that I was told that gays were out to deliberately spread AIDS, a calumny that still has traction in some quarters. It was at a conference I attended with the youth group where I heard a man who styled himself a Christian comedian crack a joke about “faggots,” to the riotous laughter and thundering applause of the audience. It was at a smaller youth gathering where I heard another speaker talk of shipping gays off to a desert island, once again to the acclaim of those assembled.

If hell was for your garden-variety sinner, the sub-basement was for the gays. It was a lesson I learned well.

What that meant for me, a boy who’d known he was different for as long as he could remember, and who’d started to notice the other boys around the time when they were starting to notice the girls, was that I spent my adolescence in anguish. Every single prayer revolved around one unchanging, passionate plea to heaven: please let me not be gay any longer. I hadn’t chosen it, and God knew I’d have given anything to change it. In a letter my eighth-grade Sunday school teacher had us write to our future selves, I asked myself in coded language if I was still gay.

Of course I still was. The 18-year-old who opened that letter was just as gay as the 13-year-old who wrote it, despite half a decade of desperation.

In the aftermath of my tear-stained coming out to my family, I redoubled my commitment to faith-based conversion. On the recommendation of my college pastor, I found my way to the office of a man who was an ordained Lutheran minister with a PhD in psychology, with the intent to change. And I started reading material produced by EXODUS International, a Christian group similar in mission to JONAH.

Call it luck or call it providence, but the therapist I ended up with did me more good than I could have guessed when I walked through his door. After a few sessions patiently listening to my reasons for being there, he very gently began to suggest that perhaps I was created to be the person I was, gayness included. Maybe I already was who God wanted me to be.

With the kind of help I needed but hadn’t known I was going to get, I went from being a miserable, socially isolated weirdo to being truly happy in a way I’d never thought possible before. I came out to people at school, becoming the first openly gay person many of them had known. I was free.

Heaven only knows how things would have turned out if I’d actually gotten what I went in looking for.

People should be free to believe whatever they wish, no matter how benighted those beliefs may seem to others. As ardently as I hope no gay teenager is made despondent by hearing the same messages that I did growing up, religious liberty is at the heart of America’s foundation. It is perilous to intrude into the stuff of sermons and Sunday school lessons.

But when it comes to the services mental health professionals claim they can provide, a line must be drawn. Judgments like that in New Jersey are right to consider the lack of evidence in support of such therapies’ effectiveness, and bans against youth being made to endure them should be enacted nationwide. Whatever the substance of people’s prayers, they shouldn’t find themselves in a counselor’s office hoping for a cure that will never come.