Phelps fails to qualify for 400 meters freestyle final