On synfuels / "true" cost of formation: synthetic fuel creation would provide an alternate cost path (using different inputs and methods) to the same ends (liquid / gaseous hydrocarbon alkanes). It's not so much that this relates to the true cost of production of fossil liquid hydrocarbons as that it may afford a lower cost (and higher rate of production) alternative.

One reason I hammer the false price basis of present petroleum consumption is that if the true formation costs are accounted for, oil production becomes economically dead. You can't pump out $5 million and sell it for $1 and run a positive balance sheet. That's what so-called rational economic man has been doing since the 1850s (Galecia, the Eastern European one, beat Titusville to the oil industry by about a decade: https://en.wikipedia.org/wiki/Galicia_(Eastern_Europe)#Oil_a...)

If our energy production transitions ...

"If" does some exctremely heavy lifting in that sentence. I've been familiar with this question for most of my life, I've done some (mostly minor) work in the field, and I've been exploring the literature and state of the art fairly heavily for over a decade, including both current and older predictions and observations.

Solar power, and its derivatives (wind, hydroelectric, biomass) is all but certain to be our major energy stream going forward, though hydro and biomass are already nearly fully tapped out. There's good prospects for considerable additional contribution from intensive geothermal (that is, from active geothermal zones, not "enhanced" lower-grade geothermal), though at the cost of formations now considered natural parks. Nuclear fission will probably play a role, but that comes with numerous problems and constraints, including limited natural uranium. Thorium and breeder systems offer the option of centuries to millennia of power, possibly, though again with risks. I'm pretty confident human-controlled energy-positive fusion will never happen.

we needn't worry about running out of geologic oil.

How long do you propose burning a resource accumulated over a period of ~300m years at a rate 5 million times its rate of formation?

I'd linked this paper earlier which details the efficiencies (or lack) in natural kerogenesis --- how petroleum is formed (also coal and natural gas). The process is extremely inefficient. However, it's already happened, and economists, accountants, and policymakers have been eager to ignore and/or deny the costs in time and biomass. I strongly urge you to read it.

"Burning Buried Sunshine', Jeffrey S. Dukes, 2003.
https://dge.carnegiescience.edu/DGE/Dukes/Dukes_ClimChange1.... (PDF)

In the strictest literal sense, yes, there will be petrolueum in the Earth until the last of it is either subducted through tectonic processes or boiled off as the Sun consumes the Earth. Practical exhaustion will have occurred long before then, probably in coming decades, though precise timing dpeends on numerous factors (demand, technological capabilities, voluntary or forced transitions) and can't be precisely specified.

In the practical sense of providing a primary energy source (rather than, say, a material feedstock), petroleum is useful only where it can be extracted for a small fraction of the total energy delivered by that extraction. The term is EROEI -- energy returned on energy invested, coined by Charles A.S. Hall. The days of gushers spouting hundreds of feet into the air seem largely over, as are the days of a single well delivering tens of thousands of barrels a day over a span of nearly 90 years. (See the First Oil Well, Bahrain, as an example, which blew out in 1932: https://en.wikipedia.org/wiki/First_Oil_Well,_Bahrain ). Current fracked wells are expensive to drill, require constant maintenance, and typically have about a 10 year life or so, with rapid fall-off in production after the first few years.

Early oil wells delivered a 200:1 EROEI --- 200x the energy output to input. Present operations are in the 20:1 to 10:1 range. Much below 10:1 simply becomes infeasible for energy. That's when the oil stops. It's not a matter of economics, it's a matter of thermodynamics.

(Again: I'm omitting pollution and carbon emissions here, they only make the story worse.)

The chemistry for synfuels has long been worked out. The molecules cooperate. The process is a variant of what occurs naturally.

Because among other issues our fouled-up pricing of petroleum, however, the economics haven't been deemed viable. The Google (Alphabet) Project Foghorn venture was shut down when economic viability proved unattainable. And large-scale production, at a scale sufficient to supply a city or state, let alone nations, has not been developed. But yes, given sufficient energy, fuel for applications in which it cannot be viably substituted should be possible.

I've compiled a bibliography of much of the research from the 1940s through the mid-2010s:

https://old.reddit.com/r/dredmorbius/comments/22k71x/us_navy...

https://old.reddit.com/r/dredmorbius/comments/29ihl7/us_doe_...

https://old.reddit.com/r/dredmorbius/comments/28nqoz/electri...

I'd updated many of those links in a recent HN comment here:
https://news.ycombinator.com/item?id=28970111