How long does it take you to re-educate an inside/outside stray to being happy inside only cat ?

I ask because George was inside for four months (three at the shelter and one month at our house) and he still wanted out very badly.

Looking at my cats, Treacle voluntarily spends 18 hours a day plus in the house. He is the only cat I have, who wouldn’t mind being inside 24/7

NB. Not that I would ever try to keep my cats inside all the time, I am asking this as I am very curious