United Airlines said the pilots saw the helicopter, received a traffic alert and leveled the aircraft.