You could save yourself some time and use a contextual bandit solver in the first place if you are secure in your knowledge that the player's actions have no impact on the game state. There is a gradient-based method based on policy functions, if you need to use policy-space search, as opposed to tracking expected values.
Any other policy search should work too. The good thing about genetic algoirthms is that they are robust to the rest of the problem framing. The bad thing about them is that they scale poorly with problem complexity. If there are a lot of states and actions to learn, or you have designed a neural network with many parameters, it may learn slowly. I would recommend something like NEAT if you canreally must solve this using neural networks and genetic algorithms, as it is well established as a training approach for neural networks in policies for games and simulations.
If some states are are only subtly different in their features, but result in large changes to the optimal action choice, this will be a challenge to any policy search using function approximation. I would suspect gradient-based contextual bandit solvers to be better in that case, but you would need to do the experiment to be certain.
Do the optimal weights be learned that make the agent reach the target reward after some generations of training?
Given enough time, and that the GA approach used is expressive enough to search the space near optimal weights, then yes.
"Enough time" could be longer than you are willing to run the experiment.
"Expressive enough" is difficult to quantify, and with neural networks there is not an easy way to tell by inspecting code or weights or any of the design.
So, sadly, one re-wording of this answer is "It will work if it works. There is no reason why it cannot work given details in the question."