To be totally honest, asking five years of a DSLR is asking a lot, and 15-20 is not very likely. But, if you insist, dump as much money on as good a constructed body as you can get -- that is, no plastic -- you want metal, and heavy, and weather-sealed, etc. I'm not familiar with the Nikon line, but if that means going up further than the D7000 and you can afford it, go there.
That said, you have a couple critical issues with a camera that you want to last 20 years:
- Shutter Activations
- Most DSLRs are rated from 50 to 150 thousand actuations, depending on the model.
- Does that mean your DSLR will be dead after 150? No, just that this is the average lifespan of the mechanics.
- Some cameras will get significantly less; others will get more depending on treatment.
- Computers and cameras have advanced so far in the last ten years, that I can't even begin to think about what we will have in the next ten, let alone, twenty years.
- It's possible you won't have any way of procuring new media for your camera
- It's possible even if you had good media, you may not be able to get it off the media
- Once you get it off the media, will any program read it?
- Wear & Tear
- If this camera is going to be used hard, forget it. Just like anything else, it will wear out based upon use. If it's around a lot of water, sand, etc., there's little to no way it's going to last as long as you want it to last.
- Will you be able to get parts for the camera in 5 years? 10 years? 15? 20? At some point the camera will fail and you won't be able to get any parts.
- Price for Quality
- It may not be such a bad thing to simply factor in the cost of upgrades in the future every four or five years. Goodness knows that DSLRs five years ago were nothing to talk about, and now even the entry-level DSLR is better than the best film camera we had (with respect to Image Quality, AF, and a few other details). In five years, imagine what the cameras will be like -- the price will be lower, and the quality will be better, etc. At some point the cost of getting something now that probably won't last 15-20 years (and not planning for an upgrade along the way) vs. getting a medium-level body now and planning an upgrade every 4-5 years needs to be an issue.
All the above said, well constructed bodies with all the bells and whistles and latest technologies do make a difference. Lenses do too. You have to make the decision as to which one is most important to you. Lenses generally make a larger difference, but if your current DSLR is more than a year or two old, a newer, better body will also make a big difference. Just don't be surprised if whatever you get doesn't last more than four or five years.