This problem can be conveniently solved by resorting to a state-feedback controller as the one depicted below.

In this case, we have that $P=\frac{1}{m \cdot s^2}$, $x=\left[ z, \dot{z} \right]^T$, $K=\left[k_p, k_d\right]$, $k_f=\frac{k_p}{m}$. Then, we need to apply the feed-forward term $v=mg$ to counteract the gravity.
We end up with the transfer function of the closed-loop system:
$$
\frac{y(s)}{r(s)}=\frac{\frac{k_p}{m}}{s^2+\frac{k_d}{m}s+\frac{k_p}{m}}.
$$
This is a well-known and well-studied second-order system given in the form
$$
\frac{\omega_n^2}{s^2+2\xi\omega_ns+\omega_n^2},
$$
where the parameters $\omega_n$ and $\xi$ are expressed as functions of the gains $k_p$, $k_d$ and the mass $m$ as $\omega_n=\sqrt\frac{k_p}{m}$ and $\xi=\frac{k_d}{2\sqrt{m \cdot k_p}}$.
To meet the given requirements, have a look at the information you can peruse for example at https://www.javatpoint.com/control-system-time-response-of-second-order-system, where the overshoot and the settling-time are provided by the following expressions:
$$
\begin{cases}
e^\frac{\pi\xi}{\sqrt{1-\xi^2}}=0.05 \\
\frac{4}{\xi\omega_n}=1
\end{cases}.
$$
The gains $k_p$ and $k_d$ can be thus readily determined from the formulas above through substitution.
For a unitary mass $m=1$ kg, it comes out that $k_d=8$ Ns/m and $k_p=k_f=33.596$ N/m.
Here's the step response:

The step response is generally given with respect to a unitary input step; however, the system is linear and thus this behavior is preserved also for an input step of amplitude $0.9$ m.
To conclude, your controller's output shall be:
u = params.mass*params.gravity - kp*z - kd*v_z + kf*z_des;