So your problem is to solve the congruence $z^n \equiv i$ mod $pA$, where $A=\mathbf Z[i]$, the ring of Gaussian integers. As the problem is stated, a theoretical solution is easy enough to find. I stick to the notations of my previous answer, where 3 distinct cases (1), (2) and (3) were considered. Let us tackle them separately.
Case (2) : $p$ is an odd prime, $p \neq 1$ mod $4$. Then $A/pA$ is the finite field $\mathbf F_{p^2}$ (NB: I definitely prefer the notation $\mathbf F_q$ for the field with $q$ elements, because in ANT the notation $\mathbf Z_p$ is reserved for the ring of $p$-adic integers). Since $p$ is odd, $p^2\equiv 1$ mod $4$ and the cyclic group $(A/pA)^*$ of order $p^2 -1$ has a unique subroup of order $4$ generated by the class $[i]$ of $i$. So the congruence $[z]^n=[i]$ is equivalent (if we choose $n$ minimal) to " $[z]^n$ has order $4$ ", which implies that $n$ divides $\frac {p^2 - 1}4$. If this latter condition is satisfied, all the solutions with minimal $n$ will be of the form $[\zeta]^{\frac {p^2 - 1}4n}$, where $[\zeta]$ is a generator of $(A/pA)^* \cong \mathbf F_{p^2}^{*}$ .
Case (3) : $p\equiv 1$ mod $4$ and $A/pA \cong A/\pi A \times A/\pi' A \cong \mathbf F_p \times \mathbf F_p$ . This time one has to solve 2 simultaneous congruences of the form $[z]^n=[i]$ in $A/\pi A $ and $A/\pi A'$ respectively, but the method is the same as in case (2), just replacing $\frac {p^2 - 1}4$ by $\frac {p - 1}4$ .
Case (1) : $p=2$ and $A/2A$ is a ring with nilpotent elements. This could be generally complicated, but since the ring here has only 4 elements, one can just check by hand ./.