Aims. We aim to identify and characterize cores in the high-mass protocluster W49A, determine their evolutionary stages, and measure the associated lifetimes. Methods. We built a catalog of 129 cores extracted from an ALMA 1.3 mm continuum image at 0.26″ (2900 au) angular resolution. The association between cores and hypercompact or ultracompact HII (H/UC HII) regions was established from the analysis of VLA 3.3 cm continuum and H30α line observations. We also looked for emission of hot molecular cores (HMCs) using the methyl formate doublet at 218.29 GHz. Results. We identified 40 cores associated with an H/UC HII region and 19 HMCs over the ALMA mosaic. The 52 cores with an H/UC HII region and/or an HMC are assumed to be high-mass protostellar cores, while the rest of the core population likely consists of prestellar cores and low-mass protostellar cores. We found a good agreement between the two tracers of ionized gas, with 23 common detections and only four cores detected at 3.3 cm and not in H30α. The spectral indexes from 3.3 cm to 1.3 mm range from 1, for the youngest cores with partially optically thick free-free emission, to about −0.1, which is for the optically thin free-free emission obtained for cores that are likely more evolved. Conclusions. Using the H/UC HII regions as a reference, we found the statistical lifetimes of the HMC and massive protostellar phases in W49N to be about 6 × 104 yr and 1.4 × 105 yr, respectively. We also showed that HMCs can coexist with H/UC HII regions during a short fraction of the core lifetime, about 2 × 104 yr. This indicates a rapid dispersal of the inner molecule envelope once the HC HII is formed.