Template Engineering of Metal-to-Insulator Transitions in Epitaxial Bilayer Nickelate Thin Films.