A loan from Essex county will allow the city to replace lead-contaminated water lines in 24-36 months.