However in what universe would a Stargate move from a military base to the Pentagon? That never made sense to me.
I think it had something to do with the real Cheyenne Mountain base shutting down in 2006, and so the producers felt it was time that Stargate catches up with the real world. As for moving it to the Pentagon, since all the Earth-based action in SGU took place in Washington, I guess it was considered convenient for the Stargate to be there. I agree, it doesn't make a whole lot of sense, especially when you consider at this point the Stargate program was supposed to be becoming more international.
The Stargate isn't at the Pentagon. It's presumably still at Cheyenne Mountain (at least it was a year before in SG:Continuum). Homeworld Command and the Alteran long-range communication stones are at the Pentagon.
You might be confused because the characters from the Destiny were shown in the Pentagon, but they aren't physically traveling there, that's just a TV conceit to make it easier to distinguish who's who. They're inhabiting the bodies of whoever are the soldiers or civilians on-duty with the stones at the time through a psychic link.