Why is the nonlinearity of this Boolean function evaluating to $\frac12$?
In this formulation you need to convert your function's output range to $\{-1,+1\}$ via $$f`(x)=(-1)^{f(x)}$$ and apply the Walsh Hadamard to the new function $f`(x)$. Using the zero one formulation means you are off by a constant depending on the number of variables since
$$
(-1)^u=1-2u
$$
for $u\in \{0,1\}.$
See my answer below on Boolean functions and crypto, it may be useful given your recent questions.
How are boolean functions used in cryptography?