The song ends on an imperfect cadence - D major chord.
A cadence is formed by two chords at the end of a passage of music. This video shows different types of cadence: perfect, interrupted, imperfect and plagal. It also demonstrates a Tierce de Picardie.