There is a difference between TNT and dynamite. Like you, I always thought they were the same.
Important explosives include trinitrotoluene (TNT), dynamite, nitrocellulose, nitroglycerin, and picric acid.
Dynamite is made from nitroglycerin and an inert, porous filler such as wood pulp, sawdust, kieselguhr, or some other absorbent material. The proportions vary in different kinds of dynamite; often ammonium nitrate or sodium nitrate is added. The mass is usually pressed in cylindrical forms and wrapped in an appropriate material, e.g., paper or plastic. The charge is set off with a detonator.
Trinitrotoluene, or TNT - CH3C6H2(NO2)3 - is a crystalline, aromatic compound that melts at 81%B0C. It is prepared by the nitration of toluene. Trinitrotoluene is a high explosive, but, unlike nitroglycerin, it is unaffected by ordinary shocks and jarring, and must be set off by a detonator. Because it does not react with metals, it can be used in filling metal shells. It is often mixed with other explosives, e.g., with ammonium nitrate to form amatol.
https://en.wikipedia.org/wiki/Trinitrotoluene