I am looking for a proof of the gradient of a squared distance function to a set $\mathcal{C}$, where the function can be shown as $$f(z) := \operatorname{dist}^2\left(z\right) = \frac{1}{2}\|z - \operatorname{proj}_{\mathcal{C}}\left( z \right) \|_2^2 .$$
What will be the gradient of $\operatorname{proj}_{\mathcal{C}}\left( z \right)$ with respect to $z$ in general?
Background: I am trying to prove the proximal operator of a squared distance function as attempted herein Proximal operator of squared Euclidean distance to a set, i.e., $\operatorname{dist}\left(\right)$, where I am unsure about the gradient of such a squared distance function.
ADD: I found same question Gradient of $\mbox{dist}\left(x, D \right)^2:= \left\| x - P_{D}(x)\right\|_2^2$, where $P_{D}(x)$ is a projection operator, but the proofs are bit too heavy (at least) for me.