I can relate to the literalism. I had an Aspie Sunday School student a few years ago who never did believe me that Mat 5:29-30 wasn't intended literally.
I'm not sure it's going to help your son, but if you want to understand the reference to Luther, here's a good explanation:
Martin Luther, Grace and OCD.
I'm just going to go through a random collection of Bible passages, in case some help.
There are lots of good Bible passages to reassure someone who has sinned. Luke 10:18, and Luke 17:4 are passages I've been using with some people. God isn't looking for perfect people. He's looking for people who trust him for their salvation. Luther got a similar message from Rom 1:17.
But what's different about his situation is that I don't think he has sinned, so those passages are only indirectly relevant. He's imagining that God is offended by things that he actually isn't. But it's hard to find an exact passage. In many ways Mat 5 from about 21 - 42 is relevant. This is where Jesus talks about intention. I don't think he has the intention to reject God. But Mat 5:27-30 is a two-edged sword, because many people understand it to say that God cares not just about what you do but even about stray thoughts. I think that's a misunderstanding of lust. I believe Jesus has in mind seeing a woman as a sex object, not the kinds of thoughts a teen has about a pretty girl.
Maybe the most relevant is the repeated theme in the NT is that God judges the heart, not just words and thoughts. E.g. Heb 4:12, but there are other passages. See also Mat 15:17-20 which says it is what comes from the heart that defiles us, not the mouth. This is the Biblical justification for my first response: that God judges based on what you mean. (I trust that even an Aspie can understand the metaphorical use of "heart.")
But I also fall back on general passages about God, the prodigal son, abandoning 99 sheep to look for the one that is lost. God loves us. He wants us with him. He's not going to give up on someone because of a stray thought.
In some ways Job is relevant. In that story Job loses all of his family and goods. The book is a discussion between Job and his friends. His friends make excuses: maybe Job sinned, maybe it's somehow all for the best. But Job won't believe it. He is mad at God. He demands that God show up and defend himself, and he's not too polite about it. God actually does show up. Job quickly changes his tune. But at the end God says Job was right, not his friends. God can deal with anger and insults, as long as we trust him.
If a general passage of reassurance is helpful, Rom 8:31-39 is the classic.
You might also want to explore his concept of what God wants from him. I could imagine a literal-minded 9 year old hearing or reading something that sends him off on a completely wrong idea. I've seen perfectly normal adults and young adults have this kind of thing. Some Christians have gotten the impression that God is sitting there looking for violations of the rules. Make sure he knows that Jesus died for him. Sins aren't going to cause God to give up someone that he's paid for. In fact Jesus is a lot more concerned about having people help other people than whether they are perfect. I've looked through every passage where Jesus talks about judgement, and there's virtually nothing about rejecting people because they are sinners. Rather, the question is whether they accept Jesus, and whether they bear fruit, i.e. serve others. See the parable of the sheep and goats.