Swimming is great, but the best way to train for running is by running. If you're looking for general cardio and stamina improvements then do your favorite type of cardio and don't worry about the rest, but if you need to specialize a certain type of exercise it's best to do that exercise.