We study the finite-size behavior of the low-lying excitations of spin-1/2 Heisenberg chains with dimerization and next-to-nearest neighbors interaction, J_2. The numerical analysis, performed using density-matrix renormalization group, confirms previous exact diagonalization results, and shows that, for different values of the dimerization parameter delta, the elementary triplet and singlet excitations present a clear scaling behavior in a wide range of ell=L/xi (where L is the length of the chain and xi is the correlation length). At J_2=J_2c, where no logarithmic corrections are present, we compare the numerical results with finite-size predictions for the sine-Gordon model obtained using Luschers theory. For small delta we find a very good agreement for ell > 4 or 7 depending on the excitation considered.