A 21-7 run to close the first half gave Duke the cushion it needed to hold off Kansas and win at Madison Square Garden.