Your idea is fine.
From your mention of distance, I assume that you’re working in a metric space. If $\langle x_n:n\in\Bbb N\rangle$ does not converge to $a$, there is an $\epsilon>0$ such that for every $n\in\Bbb N$, there is an $m>n$ such that $d(x_m,a)\ge\epsilon$. If you wish to construct your ‘bad’ subsequence rigorously, you can argue as follows.
Choose $n_0$ so that $d(x_{n_0},a)>\epsilon$. Let $n_1$ be the smallest natural number such that (1) $n_1>n_0$ and (2) $d(x_{n_1},a)>\epsilon$; the hypothesis that $\langle x_n:n\in\Bbb N\rangle$ does not converge to $a$ ensures the existence of $n_1$. In general, given $n_k$, let $n_{k+1}$ by the smallest natural number such that (1) $n_{k+1}>n_k$ and (2) $d(x_{n_{k+1}},a)>\epsilon$; once again, the hypothesis that $\langle x_n:n\in\Bbb N\rangle$ does not converge to $a$ ensures the existence of $n_{k+1}$. Clearly the sequence $\langle x_{n_k}:k\in\Bbb N\rangle$ has no subsequence converging to $a$; this contradiction shows that $\langle x_n:n\in\Bbb N\rangle$ must actually converge to $a$.
Notice that nowhere did I use compactness: it’s not necessary. The result also does not require a metric: it’s true in arbitrary topological spaces, and the proof is essentially the same.