StuGs on the panzer III chassis were initially called StuG 40s, because of the PaK40 gun (technically StuK 40) they used (at least the later versions F and G), but when the StuGs based on the panzer IV chassis went in production, they changed the name of the StuG 40 to the StuG III to avoid confusion.
So it's a difference in name only.