The Nikon D300 is a better camera than the Canon 40D. There are more features on the D300 but both will take good photos. That photo is nice but it's taken in really bad and harsh light. I would never have snapped it to begin with. No camera in the world is going to make that look like a National Geographic shot. Now if you had taken that at dawn or dusk with a tripod and cool stuff going on with clouds...then you have something. The only thing that could have helped this photo is a polarizer and change of composition.
Not sure what lens you used, but any lens including the cheap ones are sharp if you stop them down to f16 or so. You only get expensive lenses so your shots will look good wide open. If you shoot landscapes you don't shoot wide open, you stop down to f16. A $70 cheapo lens at f16 will look great.
Good luck.