Since you have a defective eigenvalue, to proceed with your method you’ll need to find a generalized eigenvector and put the matrix into Jordan normal form. However, there’s no need to go to all that trouble since powers of the matrix can be computed without working out the full decomposition.
Using the same method as the one in my answer to another of your questions (in fact, the two problems are congruent) we write $A^n=aI+bA$ and solve the system of equations generated by substituting $A$’s eigenvalues for $A$: $$a+b=1 \\ b=n,$$ (the second equation is obtained by differentiating $a+b\lambda=\lambda^n$) therefore, as in your other question, $A^n=nA-(n-1)I$.
More generally, if the repeated eigenvalue is $\lambda$ and $A$ is not a multiple of the identity, we get the system of equations $$a+b=\lambda^n \\ b=n\lambda^{n-1}$$ so $$A^n=(1-n)\lambda^n I+n\lambda^{n-1} A = \lambda^n I+n\lambda^{n-1}(A-\lambda I).$$ From Cayley-Hamilton, we know that $(A-\lambda I)^2=0$, so this result can also be obtained by writing $A$ as the sum of the identity and the nilpotent matrix $N=A-I$ and then applying the Binomial Theorem, as has been suggested in other answers. This is much less work that computing generalized eigenvectors and then performing tedious matrix multiplications to find $A^n$.