The move upends a decadeslong push by Washington to forge closer ties with New Delhi and court India as a counterweight to China.