A United Flight from San Francisco to Boston was diverted to Denver after the crew reported damage to one of its wing flaps.