To determine the value of \( k \) in the function \( g(y) = y + k \) that describes the translation from the point \( (4, -1) \) to \( (4, 2) \), we need to identify how the \( y \)-coordinate changes during the translation.
- The initial \( y \)-coordinate is \( -1 \).
- The final \( y \)-coordinate is \( 2 \).
The translation can be described by the change in the \( y \)-coordinate:
\[ \text{Change} = \text{Final} - \text{Initial} = 2 - (-1) = 2 + 1 = 3 \]
Since the function \( g(y) \) translates the \( y \)-coordinate upwards by 3 units, the equation representing this translation will be:
\[ g(y) = y + 3 \]
Thus, the value of \( k \) is \( 3 \).
So, the answer is \( \boxed{3} \).