Step 1: Write the general reaction.
Group 2 metals usually react with water as $\text{M} + 2\text{H}_2\text{O} \rightarrow \text{M(OH)}_2 + \text{H}_2\uparrow$.
Step 2: Recall the reactivity trend.
Reactivity with water increases down the group as ionisation enthalpy drops, so the heavier metals react more easily.
Step 3: Look at barium and calcium.
Calcium reacts readily with cold water and barium even more vigorously, both releasing hydrogen. So they are not the exception.
Step 4: Look at magnesium.
Magnesium does not react with cold water but does react with hot water and burns in steam, so it still reacts with water under suitable conditions.
Step 5: Look at beryllium.
Beryllium is very small with a high ionisation enthalpy and a protective BeO layer, so it does not react with water or even red-hot steam.
Step 6: Conclude.
The element that fails to react is beryllium.
\[ \boxed{\text{Beryllium, option (4)}} \]