Short answer, yes.
Longer answer, unfortunately, might be kind of important. The Gen4 Recoil Spring Assembly is larger at the nose, so it will not fit into a Gen3 Slide, nor will a Gen3 Recoil Spring Assembly fit into a Gen4 Slide without an adapter. The Gen3 Slide, at the front where the slide retains the Recoil Spring Assembly, is smaller than the Gen4 Slide. So, while a Gen3 slide will fit into a Gen4 Frame, there is quite a gap between the Slide and the Frame. The reverse is not true, a Gen4 Slide will not fit into a Gen3 Frame.
I checked this personally with a Gen3 and Gen4 G34 that I own, but I cannot speak with absolute certainty about all other models.
If any of the foregoing is confusing, please say so and I will try to clarify, or maybe illustrate with photos if necessary.
Chris