Problem is in the title. I'm not super confident in my approach: could someone let me know if there is anything wrong?
($\Rightarrow$) Let $p: X \rightarrow X$ be the constant path in $A \subset X$ with which $id_X$ is homotopic. $A$ only contains one point $a$ such that $p(x) = a$ for all $x \in X$. We know that $id_X \simeq p$, implying that $id_X \simeq p \circ j$. Similarly, $id_A \simeq p$, implying that $id_A = j \circ p$. Then, we have homotopy equivalence, implying that $X$ has the homotopy type of a one-point space.
($\Leftarrow$) Given that $X$ has the homotopy type of a one-point space, there exists some $f: A \rightarrow X, g: X \rightarrow A$ such that $g \circ f \simeq id_A$ and $f \circ g \simeq id_X$. $f \circ g = p \simeq id_X$. Therefore, we have that $X$ is contractible.