In a semigroup, an element does not (necessarily) have an inverse, so it does not make sense to write $a^{-1}$. You have constructed an isomorphism from a semigroup ($G$) to a group ($\mathbb{Z}$) which is not possible unless $G$ is actually a group.
Now assume that $G$ is cyclic and infinite. Since it's cyclic, there is a $g \in G$ such that for each $h \in G$ there is $n \in \mathbb{N}$ such that $h = g^n$. Now define $\phi: \mathbb{N} \to G$ by
$$\phi(n) = g^n.$$
This is a homomorphism since $\phi(n+m) = g^{nm} = g^n g^m$, so to prove that $\mathbb{N} \cong G$ we need to show that $\phi$ is bijective. From $G$ being cyclic with generator $g$, we already know that it is surjective (given $h \in G$ we know that there is an $n \in \mathbb{N}$ such that $\phi(n) = g^n = h$).
To prove injectivity, assume for contradiction that there is $n,m \in \mathbb{N}$ with $n \neq m$ such that $phi(n) = \phi(m)$, ie. $g^n = g^m$. Now without loss of generality we may assume that $m >n$ and we let $m = n + k$ for some $k \in \mathbb{N}$. Then
$$g^n = g^{n+k} = g^n g^k.$$
Note that multiplying by $g^k$ on the left hand side gives us $g^n g^k = g^n$, and on the right hand side gives us $g^n g^k g^k = g^n g^{2k}$. Thus we can multiply with $g^k$ as many times as we want without changing the left hand side, so for any integer $q \geq 0$ we have
$$g^n = g^n g^{qk} = g^{n + qk}.$$
Now by integer division with residue we have for each $l \geq 0$ that there are $q \geq 0$ and $r = 0,1,\ldots,q-1$ such that $l = qk + r$, so
$$g^{n+l} = g^{n + qk + r} = g^{n+qk} g^r = g^r.$$
Now this proves that $\phi(n+l) \in \{g^0, g^1, \ldots, g^{q-1}\}$ for all $l \geq 0$, so the image of $\phi$ is finite. We have already proved that $\phi: \mathbb{N} \to G$ is surjective, so this must imply that $G$ is finite which is a contradiction. So $\phi$ is injective and hence an isomorphism.