First off, make sure you drink a lot of water, starting a couple days before the run. I you're properly hydrated, that alone will take several minutes off of any run.
Second, just practice. Running on a treadmill or elliptical machine isn't the same thing. Go outside and run for a half hour, a few times a week. It gives you cardio which is important, and also conditions the muscles involved for the run.
Third, don't stop running to walk. Even for a few seconds. Unless you're extremely out of shape, running is all mind over matter. You can rest when it's over, but don't stop to catch your breathe halfway through.
I've taken more than a few PT tests in the military, and that's what kills a lot of people. They think if they sprint a little, then walk that it'll even out. But it doesn't. Keep a steady pace and you'll be fine.