Town to replace water main with $1 million grant