A driver who was almost double the drug drive limit when he lost of control of his lorry and swerved into the path of another vehicle has been jailed.