As a child, it was 4 years between flying and year-long stretches without flying were not uncommon.
As an adult, and if we're going by the the definition of "plane" as "something with fixed wings", for me it was 6 months while in Afghanistan in 2014. I flew on a C-17 into Afghanistan. About two weeks after arriving in country, I took a C-17 down to Kandahar and then flew on a contractor-operated Dash 8 back to Bagram. Then didn't get on a fixed-wing plane again until October when I left. But I still flew plenty during my time there as I crisscrossed between Bagram and various FOBs (Forward Operating Bases) as a pax in Blackhawks and Chinooks and contractor-operated helos so I was still getting to fly during that time, just in rotary wing aircraft, and I wasn't accumulating any FF miles for it.
Both pre-COVID and in the COVID world, the longest stretch for me was 5 months. Pre-COVID I went from January 2012 till June 2012 without flying. Then last year, I flew in March 2020 (flew the week things really kicked off with COVID and where everything began shutting down) and then didn't fly again until August 2020.