Given $A^{k}=0$
Subtract from $I$ on both sides,
$I-A^{k}=I \qquad \to (1)$
Now $I-A^{k}$ can be written as,
$I-A^{k}=( I - A )(I+A+A^{2}+A^{3}+\ldots +A^{k-1})$ (simplifying RHS we get LHS)
Putting this in $(1),$
$I=( I - A )(I+A+A^{2}+A^{3}+\ldots A^{k-1})$
Now question is $( I - A )^{-1}$ so we multiply with $( I - A )^{-1}$ on both sides,
$( I - A )^{-1} = (I+A+A^{2}+A^{3}+\ldots +A^{k-1})$
Hence, $(D)$ is the Answer.