The military doesn't "sell" fuel to civilian airplanes.
If you declare an emergency, USAF bases may be called on to provide for emergency landings. The fun begins afterwards, when you may or may not be detained and questioned. And later, they'll look for the best way to get you and your plane off their base, which may or may not involve refueling it. Only a few military planes (mostly basic trainers) run on 100LL, so rather than having the fuel brought in, some private pilots just got their plane towed off the base.
Then, you will be charged (billed) for the expenses. These are not limited to the cost of fuel (and delivering it to the base), but may include a number of other costs, including labor, and even a landing fee. It's not going to make financial sense, and it's going to delay you a lot.
If your reason for an emergency was unconvincing, you better hope it's a bill and not a court case, as the US military has an entire corps of lawyers, the JAG, who aren't paid by the hour. A few years ago, an unnecessary emergency landing at a military base ended in a fine for the pilot despite multiple mitigating circumstances.
For context, examining whether a pilot had sufficient reason to declare an emergency, much less suing them, is very uncommon in the aviation world. It's his diverting to a military base that led to such an unfriendly reception. As always, YMMV - there are just as many stories of very friendly receptions at military bases, mostly from the 1990s.
Just don't think of them as a backup gas station. The purpose of emergency landings is to save your life, not your trip.