This is true for any abelian group (finitely generated and free abelian is not needed) in Corollary 3 of this paper. Basically, if $\mathbb ZG_1\cong \mathbb ZG_2$, then $H_n(G_1,\mathbb Z)\cong H_n(G_2,\mathbb Z)$ for all $n\geq 0$ and since $H_1$ gives the abelianization, this gives the desired result. In fact, isomorphism of group rings implies isomorphism of abelianization.
The key idea is to show that every isomorphism of groups rings can be replaced by one which preserves augmentation. It suffices to show that if $\omega\colon \mathbb ZG\to\mathbb Z$ is the augmentation map and $\alpha\colon \mathbb ZG\to \mathbb Z$ is any ring homomorphism then there is an automorphism $\sigma$ of $\mathbb ZG$ with $\alpha\sigma=\omega$. But $\alpha(g)\in \mathbb Z^\times$ and so $\sigma(g) = \alpha(g)^{-1}g$ is the desired automorphism.