They are treated as interchangeable and they are not. On dissolved salts and minerals the two arrive at similar results. On everything else they differ completely, because one works by changing the water's phase and the other by swapping charged particles, and only one of those removes things that carry no charge.
The mechanisms
Distillation boils water to steam and condenses it back, so anything that does not evaporate with the water stays behind: minerals, salts, heavy metals, and also bacteria, viruses and most organic matter. Deionization passes water through cation and anion exchange resins that swap dissolved ions for hydrogen and hydroxide, which combine into more water. The first is a physical separation by phase; the second is a chemical exchange that acts only on charged species.
What each one misses
Deionization misses everything uncharged: dissolved organic compounds, particulates, bacteria and viruses all pass through untouched. So deionized water can read almost zero on a conductivity meter and be microbiologically unsuitable, which is why it is not handled as a drinking water product. Distillation misses compounds volatile enough to boil near water, so some organic solvents can carry over into the condensate unless the still is vented or has a carbon stage.
How they compare on cost and speed
Deionization is faster and needs no heat, but the resin is consumed in proportion to what was dissolved in the feed, so on hard water the cost per volume climbs steeply. The USGS classes water above 180 mg/L as calcium carbonate as very hard, which exhausts a cartridge quickly, and softening the feed first is standard where volume matters. Distillation is slow and uses a great deal of electricity per liter, but consumes nothing except the energy.
Choosing between them by use
For drinking, distilled is the one sold and handled as a drinking water product. For laboratory work where ionic contamination is the concern, deionized. For spot free rinsing of cars and windows, deionized, since it is faster and the requirement is simply the absence of ions. For steam irons, humidifiers and batteries, either works. And for a household drinking supply, reverse osmosis usually beats both on cost and convenience. Our softener guide covers protecting a deionizer's feed.
Questions people ask about is deionized water the same as distilled water
Are deionized and distilled water the same?
Similar on dissolved salts, different otherwise. Deionization leaves organics and micro organisms; distillation removes them.
Can I drink deionized water?
It is not handled as a drinking water product, because ion exchange does not remove bacteria, viruses or uncharged organics.
Which is cheaper to produce?
It depends on the feed. Deionization is fast but resin is consumed in proportion to dissolved solids; distillation costs electricity.
Which should I use for spot free rinsing?
Deionized. The requirement is simply the absence of dissolved ions, and it is far faster to produce in volume.