Since both groups have the same finite order, any surjection from one to the other is a bijection, so is specifically an isomorphism.
If is an infinite cyclic group, let be defined by . Note that this map is already well defined since there is no ambiguity in the representation of elements in the domain.
Using the Orders of Cyclic Subgroups, then for all distinct , then is injective. By the definition of a Cyclic Group then is surjective. As above, the laws of exponents ensure is homomorphic, so then is an isomorphism.