Input the name of the template to get the template by using GetTemplate Method.
TemplateItem templateItem = Sitecore.Context.Database.GetTemplate("NameOfTheTemplate");