There's a million examples of this trope, the old man with the pushed up brim talking about there being 'gold in them there hills'. Where does that idea come from?
I would assume that most prospectors in the various gold rushes in the Americas in the 1800's would have been younger men who could handle the more physically demanding portions of the job. So why is the old prospector always, well, old?
There were various "rushes" to the Far West, beginning with the 1849 California Gold Rush - but there were many others afterwards. These resulted in wave after wave of younger men, who far outnumbered all the other demographic possibilities - or put plainly, there were far more young men than women and older people in general.
This demographic "blip" lingered for decades in the Intermountain Mining West. For example, the census reports for Story County, Nevada - home of the Comstock Lode (Virginia and Gold Hill), founded in 1859, did not reach anything close to gender parity until the 1950 census - 90 years after the first strike (and even then, there were still slightly more men than women). This is partly because there were several "mini" rushes to the Comstock in the intervening years, each one creating a new infusion of young single men.
For the decades following the classic period of the California Gold Rush, there were always at least a few steadily-aging men who pushed into the hinterland, always hoping for the next "big strike." Most of the '49ers dispersed into cities or returned to their original homes, but the few who lingered became the exploratory mechanism that sought new ore bodies in undeveloped territories. Because of the gender imbalance, many of these men were destined never to marry. Instead, they led solitary lives.
While the prospectors of the '49 - and even those who found the Comstock Lode in 1859 - were relatively young, popular culture does not remember them very well. What popular culture does remember are the few of them who continued prospecting into more recent times, and time being what it is, those young men became the crusty old prospectors of popular imagination.
A word to the wise: all of you who are young redditors "prospecting" for the next big thing on Reddit: Turn back. Trust me: if you don't stop now and find another path, you may become the grizzled old redditor of 2070.
I don't know who first created the stereotype, but I'm pretty sure that nobody did more to impress it in public consciousness than actor Gabby Hayes.