a mere 2-1/2 years after
The two and a half year figure is for Kirk's time as Chief of Starfleet Operations. The Enterprise rebuild was one and a half years. We know from the TNG episode Cause and Effect the year they were already wearing the maroon jacketed uniform coats. Captain Kelsey said it out loud.
Problem is in canon we don't exactly know when the TOS five year mission took place, which years. That part is loose conjecture.
Between the time the Enterprise returned to Earth and the events of TMP, up to a decade easily could have passed.
My personal preference
is that after fairly brief refit, command of the Enterprise was turned over to Will Decker and he took her out again. Years and many missions later, Decker brought the Enterprise back to Earth (by this time Kirk is already CoSO) and the rebuild process began.
A year and a half after that, the events seen in the first movie.
I like that, too. I agree that it seems a bit contrived that the core group stayed together all those years in the same jobs.
I always figured that McCoy, Uhura, and Sulu were all on Kirk's staff as an admiral, which would explain why they were there in TWOK. Yes, they were still together, but at least they'd be doing different jobs.