I want to find a solution for $x$ such that
$(2-x^2) = 0 \mod{4}$
If that is true, I can write
$(2 - x^2) = 4q$
for some integer $q$. We solve for $x$ and get the expression
$x = \sqrt{2 - 4q}$.
I can choose $q$ myself, but no matter what $q$ I choose, I always get $x$ equal to a decimal number. As long as $x$ is a decimal number, $(2-x^2) \mod{4}$ can not be equal to $0$ and so it seems like the equation has no solution. But in order to say this for sure I need to prove that $x$ can not be an integer for any value of $q$. How do I do that?
This answer builds completely on GoodDeed's excellent answer, but I think going into further detail is useful.
Consider that
$$x=\sqrt{2-4q} = \sqrt{2 (1 - 2q)} = \sqrt 2 \sqrt{1 - 2q}$$
$1 - 2 q$ is odd for all $q \in \Bbb Z$. This means that $x$ must be irrational because $\sqrt{1 - 2q}$ will never have a factor of $\sqrt 2$.
It may be worth noting that while $x$ cannot be an integer value, your question doesn't make clear why you need to exclude these solutions. An irrational $x$ is a valid solution, unless there are other constraints on it you're not mentioning.