In 1897, 21-year-old Jack London, along with partners Merritt Sloper, Thompson, and Goodmen, traveled via ship along the coastal route called the Inside Passage of Alaska to Skagway and Dyea, Alaska, which were gold rush towns at the time of the Klondike Gold Rush. He and his partners hiked the Chilkoot Trail towards Dyea that winds in and out of Alaska and the Canada-owned territory called Yukon, carrying 1500 pounds of equipment and provisions total in the hopes of striking it rich in the gold rush towns. He and his partners even had to hike over the Chilkoot Pass, which is a high mountain pass through the Boundary Ranges of the Coast Mountains between the borders of Alaska and Canada. The pass has a winter snow depth of 70 to 100 feet. London and his partners started crossing the pass in fall of 1897, and though the going was tough, successfully made it. The editors of Short Stories for Students, Vol. 7, quote London as once giving the following description of the trail:
[The] main trail--that led south five hundred miles to the Chilcoot Pass, Dyea, and salt water; and that led north seventy miles to Dawson, and still on to the north a thousand miles to Nulato and finally to St. Michael on Bering Sea .... (eNotes, "Historical Context")
Hence, as seen in the short story "To Build a Fire," London had a first-hand experience of what his protagonist suffered in Yukon as he tried to make his way towards camp to join his friends, most likely the protagonist's intended partners in gold mining. What's more, London had witnessed all of the many prospectors who did not survive the journey; it has been estimated that 100,000 prospectors headed up to Alaska to find gold during the Klondike Gold Rush, but only 30,000 of them actually survived the journey (World History Group, "Klondike Gold Rush"). Hence, London wrote the story to capture nature as a deadly unconquerable and fearsome force; but he also wrote it to depict the foolishness commonly displayed by the prospectors in that time period.