Let $A$ be an abelian group of order $n = p_1^{\alpha_1} \cdot \ldots \cdot p_k^{\alpha_k}$ (i.e., $n$'s unique prime factorization). The Primary Decomposition Theorem states that $A \cong \mathbb{Z}_{p_1^{\alpha_1}} \times \ldots \times \mathbb{Z}_{p_k^{\alpha_k}}$. On the other hand, the Fundamental Theorem of Finitely Generated Albelian Groups states that $A \cong \mathbb{Z}_{n_1} \times \ldots \times \mathbb{Z}_{n_j}$ for some $\{n_j\}$ s.t. $n = n_1 \cdot \ldots \cdot n_j$ and $n_{i+1}\,|\,n_i$ for all $1 \le i < j-1$. Now I'm confused because it initially seems to me that both of these statements cannot be true at once.
For example, suppose that the order of $A$ gives rise to at least two unique isomorphism types given by the Fundamental Theorem of Finitely Generated Abelian Groups. That is, suppose that $|A_1| = |A_2| = n = p_1^{\alpha_1} \cdot \ldots \cdot p_k^{\alpha_k}$ whereby $A_1 \not\cong A_2$ so that by the Fundamental Theorem of Finitely Generated Groups we have
$ A_1 \cong \mathbb{Z}_{n_1} \times \ldots \times \mathbb{Z}_{n_j} $
and
$ A_2 \cong \mathbb{Z}_{n_1} \times \ldots \times \mathbb{Z}_{m_k} $
with $\{n_i\} \ne \{m_k\}$. But we know no matter what that by the Primary Decomposition Theorem we have that $A_1 \cong \mathbb{Z}_{p_1^{\alpha_1}} \times \ldots \times \mathbb{Z}_{p_k^{\alpha_k}} \cong A_2$, a contradiction.
What am I missing?