Search for high-mass resonances decaying to a jet and a Lorentz-boosted resonance in proton-proton collisions at $\sqrt{s} =$ 13 TeV