In theory, given enough money to source replacement components, an old diesel loco could be kept running indefinatly.
IN PRACTICE though the limit is the wearing out or breakage of larger unique engine components, spares usually exist and can be stockpiled, but stocks will eventually be used up. It seems unlikely that special manufacture of highly stressed, close tolerance engine components would be viable.
Steam locos by contrast are relatively low technology, if a new one can be built from scratch, as Tornado was, then that suggests that any broken or worn out component could be manufactured if needed.
Building a steamer is expensive but simpler than a diesel.
Looking further ahead, I doubt that any relatively modern DMUs will still be running in 100 years time, far too complex once specialist spares are exhausted. In 2115, a class 159 might well be "stuffed and mounted" in the NRM, but in running order ? I doubt it.
I expect that a few class 66s will be running in 100 years, they are at present so numerous, that a few could be kept running by cannibalizing others.
I doubt that any 47s will be running in 100 years, some spares are already in short supply.