Projection onto a convex
If $C$ is invertible, then $B=CC^{\text{T}}$ is positive definite. Then the problem is equivalent to the point-to-ellipse projection in $\mathbb{R}^n$. Your calculation seems to be fine, however it seems that there is no analytical formula for this problem, see for example https://tcg.mae.cornell.edu/pubs/Pope_FDA_08.pdf, Chapter 8, where the same problem is solved only numerically.