Here's a proof that requires no cohomology at all.

Let $H$ be the infinite cyclic subgroup of finite index. Your group $G$ will be finitely generated, say by $g_1,\ldots, g_n$. Now the centralizer of any of these, say $C_G(g_1)$, will intersect $H$ non-trivially, and hence $C_G(g_1)\cap H$ is of finite index in $H$; hence is of finite index in $G$. But then $Z(G)=\cap C_G(g_i)$ is of finite index in $G$; this implies that $G'$ is finite, and since $G$ is torsion-free, $G'$ is actually trivial, so $G$ is abelian. But the only f.g. (torsion-)free abelian group which is virtually cyclic is $\mathbb{Z}$.