It’s nice to see somebody taking the long view when it comes to vehicle ownership. Cars have become an increasingly throw-away commodity, and it seems a shame that all that engineering and development doesn’t get a longer lifespan.
The BT-50 and Ranger you’ve nominated are, fundamentally, the same vehicles under the skin, so the choice will come down to the options fitted and the trim level that combines the features you want in one package. As a rule of thumb, the five-cylinder engine option will do a better job of hauling a slide-on camper into a headwind and will always be worth more as a trade-in (although that’s clearly not a concern for you).
If you’re planning to keep the vehicle up to 300,000km, there’s a very good chance you’ll need to spend some money on the vehicle’s direct injection system at some point. A set of injectors and filters as well as an injector pump are all likely to need replacement over the distance you’ve nominated. That said, all modern common rail diesels seem to be in the same boat here, but if you’re prepared to service the vehicle religiously, then those expenses should be kept to a minimum. Take it as read, though, that a modern turbo-diesel will not appreciate neglect in this area.
The other thing to watch out for is a vehicle that has already had a hard working life, as these dual-cabs often have. The tray-back you want also means the vehicle is likely to have been a work truck rather than a lifestyle accessory, so have any prospect checked independently before handing over the money.