A search for a heavy neutral Higgs boson, A, decaying into a Z boson and another heavy Higgs boson, H, is performed using a data sample corresponding to an integrated luminosity of 139 fb^{-1} from proton–proton collisions at \sqrt{s} =13 \text {TeV}TeV recorded by the ATLAS detector at the LHC. The search considers the Z boson decaying into electrons or muons and the H boson into a pair of b-quarks or W bosons. The mass range considered is 230–800 \text {GeV}GeV for the A boson and 130–700 \text {GeV}GeV for the H boson. The data are in good agreement with the background predicted by the Standard Model, and therefore 95% confidence-level upper limits for \sigma \times B(A\rightarrow ZH)\times B(H\rightarrow bb \; \text {or} \; H \rightarrow WW)σ×B(A→ZH)×B(H→bborH→WW) are set. The upper limits are in the range 0.0062–0.380 pb for the H\rightarrow bbH→bb channel and in the range 0.023–8.9 pb for the H\rightarrow WWH→WW channel. An interpretation of the results in the context of two-Higgs-doublet models is also given.