We will instead, because it is slightly easier, solve the functional equation for functions $f$ which map $\mathbb{N}_0$ to $\mathbb{Z}$, and then pick out the solutions which we find that happen to satisfy the requirement that $f(n) \geq 0$ for all $n$.
Consider some fixed value of $n\in\mathbb{N}_0$, and look at the sequence given by
$$ \begin{align*}
a_0 & = n \\
a_{m} & = f(a_{m-1}) \text { for } m \geq 1
\end{align*} $$
i.e., We consider the sequence $n, f(n), f(f(n)), f(f(f(n))) \ldots$
From the functional equation, we see that this sequence satisfies the recurrence relation
$$ a_{m+2} + a_{m+1} = 2a_m + 3k$$
for all $m \geq 0$. A particular solution to this recurrence relation is given by
$$ a_m = n + mk $$
for all $m \geq 0$. The general solution is then given by
$$ a_m = b_m + n + mk $$
where $b_m$ is some solution to the homogeneous recurrence relation
$$ b_{m+2} + b_{m+1} - 2b_m = 0 $$
for all $m \geq 0$, and $b_0 = 0$.
The characteristic polynomial is $\lambda^2 + \lambda - 2$, which has roots $\lambda = 1$ and $\lambda = -2$. Thus the general solution to this recurrence relation is given by
$$ b_m = A(n) 1^m + B(n) (-2)^m $$
where $A$ and $B$ are "constants" which can depend on $n$ (but do not depend on $m$).
Now we know that $a_m \geq 0$ for all $m$, and so we must have that $b_m \geq -n - mk$ for all $m$.
Suppose that $B(n) \neq 0$. For $m$ large enough, we know that
$$ |B(n)| 2^m > A(n) + n + mk $$
since the right hand side grows linearly while the left hand side grown exponentially. Consider such a $m$ where $m$ is odd if $B(n)$ is positive, and even if $B(n)$ is negative. Then
$$ b_m = A(n) + B(n) (-2)^m = A(n) - |B(n)|2^m < -n-mk $$
which is a contradiction, since we require $b_m \geq -n - mk$ for all $m$.
Thus we must have that $B(n)=0$. The general solution to the recurrence is then
$$ b_m = A(n) $$
i.e. The sequence $(b)$ is constant. But we have that $b_0 = 0$, and so $b_m = 0$ for all $m$. Thus the most general solution for the sequence $(a)$ which satisfies $a_m \geq 0$ for all $m$ is given by
$$ a_m = n + mk $$
In particular, we find that
$$ f(n) = a_1 = n+k $$
This holds for all $n$, and so we see that the only solution to the functional equation (which only takes values in the non-negative integers) is given by
$$ f(n) = n+k $$
for all $n$.