Not a mechanical engineer here, but I reckon close to a decade would be pretty realistic for full operational restoration. Even a small amount of lost critical maintenance knowledge could cost the whole airframe.
I'd compare it to a really old codebase. Sure, our modern tech is much better. But if you need to make an old, top-secret COBOL program work as-is, you're in a pickle. Sure, we could rewrite it in Rust and make it way better, but management sees it as more cost-effective to just "turn the old one back on, it worked great!". And unlike software, it's pretty hard to comprehensively test a plane in a non-destructive way. Bolt falls off turbine while in flight, etc etc. Losing even a single SR-71A airframe would be a massive headache, methinks.