Anywhere from 3-6 months. I saw people get jammed up by NAMI, myself and some other ensigns got pulled aside for a special project, SNFOs always move faster through the pipeline, etc. Do not count on classing up together, even if you check in around the same time. Definitely don't count on finishing together either - everybody goes at different paces in the flying phase, people roll swim, people roll physio. People do fail out of or DOR from NIFE. There's a wait for Primary, a wait for Intermediate/Advanced, it just keeps happening. Going forward, count on waiting and count on not knowing for how long. Take all the leave you can, study and stay busy.
I know many people who lived out near Perdido Key/Gulf Shores so that they would be close to Jack Edwards (now Gulf Shore Regional) and so that the Navy would move them near Whiting when they went to primary. My wife wanted to be close to downtown Pensacola, so we lived in the East Hill area. My commute to Whiting would've been brutal (by my standards), 45-60 minutes one way - but I chose Corpus and that didn't end up being a problem for me. Also, I was literally 5 minutes from KPNS - and having a 5 minute commute from my NIFE flying phase base was truly awesome. A good buddy of mine bought a house in Pace and had a horrible commute for all of NIFE but now has no commute for Primary. Another lived exactly halfway between NASP and Whiting and could tolerate the commute - but he also has an infant and is trying to move as little as possible during flight school. He even talks about going helos for this reason.
TL/DR: I'm only in primary, but my experience thus far + talking to people farther down the pipeline tells me that where you choose to live in relation to your duty station in flight school is a dice roll. The gouge is always changing, landlords in these military towns are a mixed bag. Find out what you can, make an educated guess as to what you think will be most conducive to completing a given phase of training.