A search is presented for a heavy spin-1 resonance mathrm {Z}' decaying to a top quark and a vector-like top quark partner text {T} in the lepton + jets final state. The search is performed using a data set of mathrm {p}mathrm {p} collisions at a centre-of-mass energy of 13,text {TeV} corresponding to an integrated luminosity of 35.9{,text {fb}^{-1}} as recorded by the CMS experiment at the CERN LHC in the year 2016. The analysis is optimised for final states arising from the text {T} decay modes to a top quark and a Higgs or mathrm {Z} boson (text {T} rightarrow mathrm {H} mathrm {t}, mathrm {Z} mathrm {t}). The event selection makes use of resolved and merged top quark decay products, as well as decays of boosted Higgs bosons and mathrm {Z} and mathrm {W} bosons using jet substructure techniques. No significant deviation from the standard model background expectation is observed. Exclusion limits on the product of the cross section and branching fraction for mathrm {Z}'rightarrow mathrm {t}text {T}, text {T} rightarrow mathrm {H} mathrm {t}, mathrm {Z} mathrm {t}, mathrm {W}mathrm {b} are presented for various combinations of the mathrm {Z}' resonance mass and the vector-like text {T} quark mass. These results represent the most stringent limits to date for the decay mode mathrm {Z}'rightarrow mathrm {t}text {T} rightarrow mathrm {t}mathrm {H} mathrm {t}. In a benchmark model with extra dimensions, invoking a heavy spin-1 resonance mathrm {G}^* , masses of the mathrm {G}^* between 1.5 and 2.3,text {TeV} and between 2.0 and 2.4,text {TeV} are excluded for text {T} masses of 1.2 and 1.5,text {TeV}, respectively.