Well, there are no local optima but plenty of global optima other than the correct answer, I think: "Hello, World!" and "!dlroW ,olleH" have the same fitness for example. So no, the gradient won't necessarily lead you to the solution.
Now, suppose we defined the fitness function instead as the number of correct characters plus the number of characters in the right place, then we'd have local optima and a better chance of getting to the optimum.
The gradient here is continuous and smooth. Problems where GA is an appropriate solution have fitness landscapes that are much more pathological.
The other answers that you are thinking on have different fitness (the comparison is target[i] ?= guess[i]).
In any case, I like this examples because they currently show the process that the GA has to converge in a way easy to see/understand. Of course, in real life it is more used when there is no information of the function to minimize (optimize), or the function is not convex in our search domain, which can lead to getting stuck in a local minimum using other search methods.
I have always felt that the fancy name increased the interest on the topic.
> Return the sum of the differences between the chromosome and the target string.
but I mean something more like:
> Return the sum of the character-wise differences between the chromosome and the target string.