Actually, Boeing had to start from scratch to build those new wings. Yes, there is now tooling for the wing, but nothing else.
Boeing is pretty good at reverse-engineering and recreating old airplane parts.
A couple years back they produced a brand new main wing spar for one of the restored and flying B-17s. CAF’s “Texas Raiders” I think. I think 15-20 years ago that would have been prohibitively expensive, but Boeing took laser measurements of an existing, borrowed spar (or maybe it was just the old engineering diagrams) rendered the new one using CAD and set one of their big milling machines to the task. Still expensive, but also within the levels of acceptable cost to keep an old warbird in the air.