We can reformulate this problem as first choosing an odd number
followed by $k-1$ odd gaps between consecutive numbers (odd gaps
change parity). This gives the generating function
$$\frac{z}{1-z^2} \left(\frac{z}{1-z^2}\right)^{k-1}.$$
We multiply by $1/(1-z)$ to sum the contributions ending in at most
$n$ and obtain
$$\frac{1}{1-z} \frac{z^k}{(1-z^2)^k}.$$
Extracting coefficients we get
$$[z^n] \frac{1}{1-z} \frac{z^k}{(1-z^2)^k}
= [z^{n-k}] \frac{1}{1-z} \frac{1}{(1-z^2)^k}.$$
This is
$$\sum_{0\le 2q\le n-k} {k-1+q\choose q}.$$
This sum can be evaluated by inspection or we may use
$${k-1+q\choose q} = [z^q] \frac{1}{(1-z)^k}$$
to get
$$[z^0] \frac{1}{(1-z)^k} \sum_{0\le 2q\le n-k} z^{-q}
= [z^0] \frac{1}{(1-z)^k}
\frac{1/z^{\lfloor (n-k)/2\rfloor+1}-1}{1/z-1}
\\ = [z^{-1}] \frac{1}{(1-z)^{k+1}}
(1/z^{\lfloor (n-k)/2\rfloor + 1}-1)
\\ = [z^{\lfloor (n-k)/2\rfloor}] \frac{1}{(1-z)^{k+1}}.$$
We thus get for the end result
$$\bbox[5px,border:2px solid #00A000]{
{\lfloor (n-k)/2\rfloor +k \choose k}.}$$
Here is a simple Maple program to help clarify what interpretation of
the question is being used.
with(combinat);
ENUM :=
proc(n, k)
option remember;
local choice, res, pos;
res := 0;
for choice in choose(n, k) do
for pos to k do
if pos mod 2 <> choice[pos] mod 2 then
break;
fi;
od;
if pos = k+1 then
res := res + 1;
fi;
od;
res;
end;
X1 := (n,k) ->
add(binomial(k-1+q,q), q=0..floor((n-k)/2));
X2 := (n,k) -> binomial(floor((n-k)/2)+k, k);
Remark. I somehow overlooked the fact that the largest element in
the set is in fact fixed and equal to $n.$ This yields the even
simpler count
$$[z^n] \frac{z^k}{(1-z^2)^k}
= [z^{n-k}] \frac{1}{(1-z^2)^k}.$$
As $n$ and $k$ have the same parity this becomes
$${(n-k)/2 + k-1\choose k-1}.$$