*You can replace “a while” with any article + unit of time like: a year, a month, a minute, etc.
Ex: It’s been “a while” since I took a shower.
Awhile
(adverb)
= for a short time (adverb)
*You can replace “awhile” with any other adverb like: quickly, badly, daily, etc.
Ex: I walked “awhile.”
* IMPORTANT NOTE: Not to confuse you more, but if you rephrase the previous sentence and replace the adverb with a prepositional phrase, you need the noun again because an adverb can’t be the object of the preposition.