Amplitude analysis and branching fraction measurement of D0 →k-π+π0π0