Spin fluctuations in superconducting BaFe2(As(1-x)P(x))2 (x=0.34, T(c)=29.5 K) are studied using inelastic neutron scattering. Well-defined commensurate magnetic signals are observed at (π, 0), which is consistent with the nesting vector of the Fermi surface. Antiferromagnetic (AFM) spin fluctuations in the normal state exhibit a three-dimensional character reminiscent of the AFM order in nondoped BaFe2As2. A clear spin gap is observed in the superconducting phase forming a peak whose energy is significantly dispersed along the c axis. The bandwidth of dispersion becomes larger with approaching the AFM ordered phase universally in all superconducting BaFe2As2, indicating that the dispersive feature is attributed to three-dimensional AFM correlations. The results suggest a strong relationship between the magnetism and superconductivity.