By repairing and replacing gas pipelines, the federal program helps municipal and community-owned utilities lower energy costs, create jobs and cut emissions, but its funding expires next year.