Edit: According to the comment of Jaap Eldering, I realize that the previous version of my question was elementary, so I reformulate my question. I thank him for his comment.
Is there a real analytic vector field $X$, locally defined around $0\in \mathbb{R}^{2n}$ with the following properties:
1)The origin is an isolated singularity for $X$ and its linear part is the matrix $J=\begin{pmatrix}0&I\\-I&0 \end{pmatrix}$.
2)There is a Riemannian metric locally defined on a neighborhood $U$ of origin such that all trajectories of $X$ in $U\setminus \{0\}$ are unparametrized geodesic.
This question is some how a singular version of the concept "geodesible flow", a concept which is mainly related to Finding a 1-form adapted to a smooth flow, such that the flow has a unique isolated singularity whose linear part is in the form $\begin{pmatrix}0&I\\-I&0 \end{pmatrix}$.
The Motivation: There is no such metric for $n=1$.