Existence of solutions to the generalized dual Minkowski problem