Just change the x,y and z coordinates into the required position.
So, for example, if you like to move the particles to the right, just increase/decrease the x/z coordinates in the spawnParticle(..) method:
world.spawnParticle(spell.castState < 4 ? EnumParticleTypes.FLAME : EnumParticleTypes.LAVA,
3+spell.prevPosX + (spell.motionX * j) - world.rand.nextFloat() * 0.5F,
spell.prevPosY + (spell.motionY * j) - world.rand.nextFloat() * 0.5F,
spell.prevPosZ + (spell.motionZ * j) - world.rand.nextFloat() * 0.5F,
0, 0, 0);