Well, I'll be the first to admit that my perceptions of the time period between TMP and TWOK are colored by the fact that I'm an avid Star Trek novel reader. There have been numerous novels that take place between the 2 films that show Kirk commanding the
Enterprise for a number of years, perhaps not a specific 5YM, but at least for an indeterminate amount of time. Some of them were exploration related, but a number were mission specific. For instance the "New Earth" series where the
Enterprise was sent to help colonists settle a new world in a dangerous sector of space. In that case Kirk's prior experience as chief of Starfleet Operations played a role in that mission. You might say the same about "Ex Machina". So a number of the post-TMP novels, you could argue, draw on Kirk's experience as an Admiral in his missions. They wouldn't necessarily be a 5YM redux. Many times he was sent on special missions in the novels owing to his experience.
And one reason I really liked "The Higher Frontier" is it depicts a plausible story for how Kirk was promoted again. He wasn't just being promoted to a desk job. He was promoted partly to become commandant of Starfleet Academy, and he found the idea of guiding and grooming young minds attractive. AND he would also be given special missions that someone with his experience would be perfect for. The Enterprise, under Captain Spock, became his attached ship. For a lot of the time it would serve as a training vessel. And when a mission called for it Kirk would use the
Enterprise and select officers as needed to carry out that mission. Spock remained in command of the ship, Kirk of the mission (the novel also explained that not all of Kirk's command crew would be together at all times, Chekov obviously had left for the
Reliant--which also makes an appearance in the novel, a rare pre-TWOK mission for the
Reliant, and Kirk would call in certain of his officers depending on their skills and what was needed). And Kirk's promotion occurred in the novel in 2280, so about 7 years after TMP (give or take), and about 3 to 4 years pre-TWOK, give or take (so Kirk was admiral and Spock captain for at least a few years before TWOK in that scenario, sort of splitting the difference).
So my opinion of what happened is heavily influenced by that. In fact, I've never read a post-TMP novel that suggested otherwise. TWOK is almost always assumed to be years after TMP and Kirk commanded the ship for an indeterminate period of time after TMP, a few years at least.
Why is this thread drifting to Deep Space Nine??? There is a section for the Defiant and anything else DS9.

I have to admit, they lost me as well on that. But as BillJ noted that's not uncommon I suppose (I'm guilty of thread drift myself sometimes).