Approximating your wires as infinitely thin, In calculating the magnetic field you need to use Jdv Which has units
$\frac{Q}{m^3} \frac{m}{s} m$
= $\frac {Q}{s} m$
This is thensame as Current * dl
Where dl is the displacement differential of your chosen curve
this is obviously a simplication derivation using units. The real derivation is more complex , But for another way is that in calculating the fields, Dv can be split into da dl and the 1/R^2 are independent of da as da is infinitely thin, so$ \iiint Jdv $becomes$ \int \iint J da dl = \int I dl $
Where I is vector current, and dl is a scalar, If I and dl are in the same direction then I can say its (Scalar current * vector dl)
so in calculating the magnetic field of a solenoid you can just use Idl instead of Jdv, so you don't need to worry about come complex vector current density.You can simply worry about SCALAR current.
Obviously dl is whatever curve I want my current to be, which is done with a specific curve parameterisation.
For a helix ( solenoid shape) a parameterisation you could use would be
$ r = Rcos(\theta)\hat i + Rsin(\theta)\hat j + \frac{\theta}{2\pi} \hat z$$ r = Rcos(\theta)\hat i + Rsin(\theta)\hat j + \frac{\theta}{2\pi} \hat k$
This would span a spring shape that one full turn goes over a distance 1 in the k direction
then to find dr it's$ r'(\theta)d\theta$
Look up biot savart law