Well, the truth is probably somewhere in the middle. It's certainly not binary. That is, some just require more effort.
OTOH, as a tutor back in my CS days, I witnessed the difference between those who just needed an occasional nudge and those who really just constantly beat their heads against the wall. It really wasn't that they were unwilling to try. It was more that their minds weren't wired to conceptualize and approach CS-style problem-solving. Sure, I could walk them through a problem, but next time around it was like starting over.
It reminds me of geometry proofs. Some could learn to stumble their way through, while others just glided through almost effortlessly.
So, the stick-to-itness attitude that you mentioned is certainly a requirement that all of us have had to wield at times, but I'm speaking more of the ability to make progress while wielding that attitude.
And, it's not necessarily a matter of intelligence as much as thinking styles. That's the "click" I'm talking about. So, this is not some superiority trip.
In fact, in the context of this discussion, I was actually being optimistic. Some were suggesting that the prisoners couldn't learn to be viable if they were so far behind those who had been doing it since childhood. My take is that if a person has aptitude for it, they can make up a lot of lost ground. Simple exposure might activate them in ways that others who work for years in the field might never achieve.