4. Given the complex number $z$ satisfies $z^{3}=27$. Then the value of $z^{5}+3 z^{4}+2242$ is ( ).
(A) 2728
(B) 1999
(C) 2247
(D) 2728 or 1999
4. D.

From $z^{3}=27$ we get $(z-3)\left(z^{2}+3 z+9\right)=0$.
When $z=3$, the original expression $=3^{5}+3 \times 3^{4}+2242=2728$.
When $z \neq 3$, i.e., $z$ is a complex number, then $z^{2}+3 z+9=0$.
$$
\begin{aligned}
\text { The original expression } & =z^{3}\left(z^{2}+3 z+9\right)+2242-9 z^{3} \\
& =2242-9 \times 27=1999 .
\end{aligned}
$$