small advise: stick to the first error "Error: Incompatible types: got "untyped" expected "Boolean" as that is easier to grasp.
You're thinking waaay out of the box in your last attempt.
What the compiler is trying to tell you in the first error is that it is expecting a boolean (or expression that evaluates to a boolean result value) but it got a untyped of something instead.
Pascal is for instance not like c where every assignment is checked against zero and evaluates to a true or false value by some complicated compiler magic that nobody is able to explain when a statement get too complicated to comprehend.
Pascal needs you to be explicit, also in this case. Doing an assignment alone is not a boolean expression and will also not evaluate to a boolean.
So, a boolean expression is required. I already linked to some of the operators that you could use to 'make' a boolean expression.
So
X := Y would
assign Y to X
and
X <> Y would be a
expression that evaluates to a boolean that could be used for instance in a if-then-else construction.
edit: reworded and added links
edit2: finally i was able to find a link that has things summed up using simple words (i hope),
here.