Does the short exact sequence $0\mapsto \mathbb{Z}^k\mapsto \Gamma\mapsto \mathbb{Z}^\ell\mapsto 0$ split?

A counterexample is the following short exact sequence: $0 \rightarrow \mathbb{Z} \rightarrow T \rightarrow \mathbb{Z}^2 \rightarrow 0$. Where $T$ is the group of upper triangular matrices in $\text{GL}_3(\mathbb{R})$ with unit diagonals.

The injection is defined by the formula $z\mapsto \begin{pmatrix} 1 &0&z\\ 0 &1 &0 \\ 0 &0&1\end{pmatrix}$. The surjective morphism is defined by the formula $\begin{pmatrix} 1 &a&c\\0&1&b\\0&0&1\end{pmatrix} \mapsto (a, b)$.

The image of the injection and the kernel of the surjection is the subgroup generated by $\begin{pmatrix} 1 & 0 & 1\\ 0 & 1 & 0 \\ 0 & 0 & 1\end{pmatrix}$. This shows that this is a short exact sequence.

However the sequence is clearly not split because $T$ is not isomorphic to the product of $\mathbb{Z}$ and $\mathbb{Z}^2$ because $T$ is not abelian.