It’s not really clear how long Luke was hiding. Rey was born in 15 ABY, which was 11 years after Return of the Jedi. At some point before she was ten, she was left on Jakku. (She finds a flight helmet while scavenging as a ten-year-old.) Force Awakens is set 30 years after Jedi, so I’d say Knights of Ren must’ve destroyed Luke’s school more than a decade before the movie.
Pablo Hidalgo of the Lucasfilm Story Group when asked if the Ren attack on Luke’s school was “more recent than 14/15 years ago” said it was, but declined to get more specific than that.
So, I’ll go with 10-12 years in exile.