Nicotine gum and lozenges work just fine to control the cravings during the longest flight.
I've been addicted for decades (OK, over 3 decades) and I've never been on a trip where I couldn't just do without a cigarette or a nicotine replacement like the gum until I was outside the airport. If I can do it (obviously I have no willpower, or I would have stayed quit after I quit during pregnancies) then anyone can.