With advances in biotech and possible harnessing of biological nitrogen fixation we might overcome even this...
You can't just snap your fingers, make oil go away and expect modern civilization to keep existing as it currently does.
It took ~150yr to get the oil industry where it is today and that is with a massive financial incentive. People need lubricants, tars, fuels, plastics, everything that oil makes cheaply and well. In the absence of strong organic (not artificial, i.e. regulatory compliance) incentives to stop using oil it will almost certainly take much longer than 150yr to reduce oil usage for energy/fuel to negligible levels. We will likely never stop using oil for plastics, fertilizers and other "critical to modern civilization" things until something that's cheaper and equivalent or better comes along for every last use case.
Keep in mind that whatever we have next will have tradeoffs too.
I don't think it's right to estimate such a long time for oil to become obsolete as a fuel, just because we use it for other things too.