Ehh, i mean for how much longer do we actually need pilots? I was under the impression they're mostly auto pilot these days anyway.
No one has yet implemented a real point-to-point autopilot, and there are none in the pipeline for certification. It's possible there are engineers working on them, especially at Boeing/Airbus, but given airframe lifetimes at the major commercial carriers pilots are here for at least another 20 years with them, and probably 30-40 years at cargo carriers.
My napkin math says truck drivers are a MUCH higher % of ground shipping cost compared to airline pilot and flying cost.
Airlines have a lot of staff costs, but those would seem like it would be maintenance and ground crew which is even harder to automate.