"There's gold in them thar hills" is an old phrase, probably a misquote, but has been long been associated with gold prospecting in the US old west.
So a non-binary gendered gold prosector found lots of gold in "them/their" hills is a reference to how people of non-binary gender tend to use "they/them" as pronouns.
"Them/their" isn't exact, but their is the possessive form of the third-person plural pronoun "they." So it's still referencing to correct pronouns for non-binary gender, just shifted slightly for the sake of a joke.
While the layman would say, "They dug up a fortune in those hills.", a gold prospector, likely familiar with hick speak, would say "They dug up a fortune in them there hills." The non-binary part comes into play by turning there into their, alluding to the assertion of pronouns common with the non-binary community.