I read this question as: the vector $x$ should have elements $x_i \in \{1,...,n\}$ and they all should be different. I.e. $x_i \neq x_j$ if $i \neq j$.
One way of modeling this is with $n^2$ binary variables:
$$\begin{align}
&\sum_i b_{i,j} = 1\> \forall j \\
&\sum_j b_{i,j} = 1\> \forall i \\
&x_i = \sum_j j \cdot b_{i,j} \\
&b_{i,j} \in \{0,1\}
\end{align}$$
Think of $b$ as a permutation matrix.
Constraint programming solvers have typically a built-in all-different constraint, so they may be more suitable than a MIP solver.
If you mean: I repeatedly solve the model and each time I want a different solution, then you can add some integer cuts to forbid a previously found solution. Those integer cuts are somewhat complicated, but this post has an answer: https://cs.stackexchange.com/a/51948/43116.