>> Swampy smell means no air in soil.
I agree. Plus, while there was no air, some aerobic microbes died, and other switched over from using oxygen (respiration) to their backup metabolism (fermentation). While fermenting, they produce organic acids and alcohols and other undesirable things. Hence the swamp-smell.
>> I think if you dry it out it will be okay.
I'd agree, as long as you turn it or 'fluff it up' and it has time to air out thoroughly and let the more desirable aerobic soil return.
It wouldn't hurt to mix it with a shovelful of healthy soil to "re-inoculate" it as it ventilates. But that's not crucial. The healthy soil microbes would come back as soon as you scratch it into healthy soil.
Also, nothing will kill 99.99% of any species of microbe, and 0.01% remaining is enough for them to come back and take over once they get their oxygen back.
I like to let rain or a sprayer flush THROUGH anaerobic soil or compost, so the organic fermentation toxins leach out, as well as evaporating. Alternatively, and probably best of all, just turn the swamp-mud under in your compost heap. The soil life in the heap will immediately put the populations back into a healthy balance, and digest the fermentation toxins just like any other carbon food source.
Compost cures all ills!