Where all entries in the matrix are in $\mathbb{Z}/n\mathbb{Z}$
Each the the two groups clearly has $2n$ elements, then there exists a bijection $$\phi:D_n \rightarrow \begin{bmatrix} \pm 1 & k \\ 0 & 1 \end{bmatrix}$$ Beyond this, though, I'm not sure how to show that $\phi$ preserves each group's operation.
That is, for $\tau,\sigma\in D_n$, how can I show that $$\phi(\tau\cdot \sigma)=\phi(\tau)\circ\phi(\sigma)$$
Hint : $$(\pmatrix{1&k\\0&1})^n=\pmatrix{1&0\\0&1}$$ and $$(\pmatrix{-1&k\\0&1})^2=\pmatrix{1&0\\0&1}$$