According to a random internet search, the average "semi truck" age is 11 years.
So even if all brand-new trucks starting TODAY were fully electric with an electric/nonshifting drivetrain, it'd take 11-22 years to "clear out" the existing.
For a large country that's true, but regulations could adjust that. If you want to drive a truck into a city in Scandinavia or Germany, there's a good chance it needs to be newer.
For example, to drive into Copenhagen a truck or bus must be from 2015 or later, or there's a €1700 fine. (https://urbanaccessregulations.eu/ has a list/map.)
If you have a truck that's too old, you might have use for it elsewhere in Denmark, or you could sell it to someone who will drive it somewhere without these regulations and sell it there (i.e. eastern, southeastern Europe, Turkey, north Africa).
There's a diagram that would be excellent if it weren't fuzzy on page 5 (Figure 2) demonstrating this nicely. It's not at all unusual to see a truck in Romania or Bulgaria which has the shadow of some German company logo/name on it, where the logos have been removed.
So even if all brand-new trucks starting TODAY were fully electric with an electric/nonshifting drivetrain, it'd take 11-22 years to "clear out" the existing.