20 years not a problem for us
Our 23 year old Yanmar gave us 10 years of good service before we replaced it with a used Yanmar with 50 hours on it. And, it was clear that it had been used hard when we bought the boat.
If it looks good, put a test sail in your contract, and take a diesel mechanic along. If it will perform OK, get you near hull speed in flat water with some reserve, and the mechanic says it's OK, then it's a non-issue! And that would be the expected outcome for most diesels at 20 years.