Let $\tilde{Y} \xrightarrow{\pi} Y$ be the universal cover of $Y$. Since $X$ is simply connected, any continuous map $X \xrightarrow{f} Y$ can be factorized as a continuous map $X \xrightarrow{\tilde{f}} \tilde{Y} \xrightarrow{\pi} Y$. Since $\tilde{Y}$ is contractible, there is a point $y \in \tilde{Y}$ and an homotopy $h$ between the identity map on $\tilde{Y}$ and the constant map $y$ :
$h : \begin{array}{c}\tilde{Y} \xrightarrow{id} \tilde{Y} \\ \Downarrow \\ \tilde{Y} \xrightarrow{y} \{y\}\end{array}$
Composing this homotopy with $\tilde{f}$ and $\pi$, you get an homothopy $h'(t,x) = \pi(h(t,\tilde{f}(x))$
$h': \begin{array}{rcl}X \xrightarrow{\tilde{f}} & \tilde{Y} \xrightarrow{id} \tilde{Y} &\xrightarrow{\pi} Y \\ &\Downarrow &\\ X \xrightarrow{\tilde{f}} & \tilde{Y} \xrightarrow{y} \{y\} & \xrightarrow{\pi} \{\pi(y)\} \end{array}$ between $f$ and the constant map $\pi(y)$.