Speed and distance come with time. I was cycling for six months before I could start to significantly increase the distance that I was able to ride. Mountain bikes are also much harder work than a road bike, but that means you get fitter quicker.
The best advice I can give you is to ride little and often, if you live close enough to work/school to ride there during summer that's a great way to build up. Add in a couple of longer rides each week and you'll be surprised how things improve.
Don't forget to rest though, that's when your body adapts to what you've been asking it to do, if you don't rest, you just get over-tired, and then you will have trouble riding at all.