If In a group $G$, the element $a\in G$ is the only element of order $n$, i.e., $a^n=e$ for some positive integer $n$. Then we have to show that $a\in Z(G)=\{x\in G : xg=gx, \forall g\in G\}$.

How can I show this?