Virat Kohli scored 124 but India were eventually bundled out for 296 in the chase of a 338-run target against New Zealand.