Solution (source code)

= Solution

For every binary sequence $(\varepsilon_n)$, independently fix the pair $(2n-1,2n)$ when $\varepsilon_n=0$ and swap its two entries when $\varepsilon_n=1$. The resulting map is a <permutation> with $|\sigma(j)-j|\leq1$, and different binary sequences produce different permutations. Therefore $D$ is uncountable.

In fact these are all the possibilities: if $\sigma(j)=j+1$, bijectivity and the displacement bound force $\sigma(j+1)=j$, while a point not in such an adjacent transposition is fixed.