We produced controlled heliconical structures of a twist-bend nematic (NTB) liquid-crystal (LC) phase in nanoconfinement in a porous anodic aluminium oxide (AAO) film. The structural parameters of the NTB phase such as conical angle and helical pitch can be modulated by varying the surface energy of the inner surface of the porous AAO film, done by using different self-assembled monolayers (SAMs). The LC molecules tend to be more freely packed, thus forming a larger conical angle, when placed on the tri-deca-fluoro-1,1,2,2-tetrahydrooctyl-trichlorosilane (FOTS)-treated substrate, which has a relatively low surface energy. In contrast, the molecules form a more tightly packed structure, and thus a smaller conical angle, when placed on the 2-(methoxy(polyethyleneoxy)-propyl)trimethoxysilane (PEG 6/9)-treated substrate, which has higher surface energy. This work improves our collective understanding of self-assembled heliconical structures in the NTB phase.