Not all Constitution class ships can be on a 5-year mission, as 5 (including the Enterprise) are drafted into wargame exercises in "The Ultimate Computer".
I thought of making that point myself, but I wasn't sure. After all, the E was supposedly on its own 5YM when it was reassigned to the war games, so theoretically any of the other ships could have been as well.
Still, given the immensity of space, it's highly unlikely that all
five starships were simultaneously on deep-space exploration missions and yet somehow all in close enough proximity to be assembled for the war games. So yes, I agree it's probable that at least some of those ships were on different, more short-range assignments, or were between assignments.