In the introduction to Tales of Beedle the Bard, J.K. Rowling writes
Whether this commentary was written for his own satisfaction, or for future publication, we shall never know; however, we have been graciously granted permission by Professor Minerva McGonagall, now Headmistress of Hogwarts, to print Professor Dumbledore’s notes here, alongside a brand new translation of the tales by Hermione Granger.
— Introduction, J.K. Rowling (dated 2008)
As Deputy Headmistress after the Battle of Hogwarts, it seems reasonable that she took the post immediately after Snape’s defection. Note that the epilogue takes place in September 2017, so if we interpret this introduction as being in-universe in 2008, it’s consistent with the notion that McGonagall had retired by the epilogue.
There was then an interview which confirms that McGonagall retired by the time Harry’s children were attending Hogwarts:
19 years later, who’s the headmaster at Hogwarts?
Well, it would be someone new. Erm, McGonagall was really getting on a bit. So someone completely new. But if I ever do the encyclopedia, I'm promising I will give details.
— J.K. Rowling One-on-One with the Today Show (NBC): part 1, July 2007
I assume this means we’ll find out when we get to Deathly Hallows in Pottermore, but so far no detail has been given.