If you are playing on a grid, and using the grid rules, then you couldn't aim the lightning down to miss the maw demon unless you were 5' up in the air (so that the line could follow the z axis). Arguably, you could drop prone, and cast it upwards.
If you are doing theater of the mind, I could see the argument made, but would grant half damage on a failed save, and no damage on a success for the paladin (and possibly advantage as well).
As someone else has pointed out, in this example the cultist could have simply moved to a diagonal space, avoiding the argument entirely.
ncG1vNJzZmivp6x7prrWqKmlnF6kv6h706GpnpmUqHy4tMSnZJplnJ60qcDNoqWgZZKkubV50qmcpaRdorK1edOhnGaenKS8s3qVbmpucWZk