Hi and welcome here!
If it runs fine on the flat but loses power uphill, this is almost always a load-related issue, not a general engine fault.
I’d check things in this order:
1. Turbo/boost system
Under load the engine needs boost. Check all turbo hoses carefully (especially underneath) for splits, soft spots, or loose clips. Also make sure the wastegate isn’t stuck open. No boost = no power uphill.
2. Fuel supply restriction
Very common on older Ducatos, especially campers. Replace the fuel filter (even if it was “recently done”), check for collapsed hoses, air leaks in fuel lines, or a partially blocked tank pickup. Fuel starvation shows up first on hills.
3. EGR valve stuck open
If the EGR is open when climbing, the engine feels strangled. Try temporarily disconnecting or blanking the EGR to see if power returns.
4. Exhaust restriction
Collapsed silencer or blocked exhaust can feel exactly like this: revs fine in neutral, no power under load.
5. Injection pump/timing (less common)
Slightly retarded timing or a tired pump usually shows as poor hill performance first, but I’d only look here after checking the basics above.
Quick question that helps a lot: Does it produce black smoke when you try to climb and still won’t pull?
That answer alone points strongly to either boost loss or fuel restriction.