India won the first three matches to take an unassailable lead in the five-match series, but New Zealand bounced back by winning the final two games at home.