Sensitivity and block sensitivity of specific problem, is there an errata? Arora-Barak exercise 12.4
The definition of $g$ should be: $g(x_1,\ldots,x_k) = 1$ if there exists $i \in [k-1]$ such that $x_i=x_{i+1}=1$ and $x_j = 0$ for $j \neq i,i+1$.

As for your question, whether $g=1$ iff the condition holds, or whether it is just a sufficient condition: in mathematics, when we define something, we use the word "if" to mean "iff". Check your favorite textbook, monograph or paper for many examples.