There’s an old John Wayne movie (1939, I think) that has to be based on this incident: The Rebs ambushed a Union train, hauled off the gold in a wagon, and it got scattered all over. But ol John found it. And shouldn’t it be the treasury guys looking for it?
Maybe Rio Lobo from 1970?
“Bent on unearthing the two Union traitors who sold gold shipment information to Confederates and caused the death of a dear brother-in-arms, the battle-tested former Union cavalry officer, Colonel Cord McNally, teams up with a pair of ex-Confederates after the Civil War.”
https://www.imdb.com/title/tt0066301/?ref_=nv_sr_srsg_0