Yes its true, for a transmission line with a fixed length the characteristic impedance is:
\$Z_0 = \sqrt{\dfrac{R+jwL}{G+jwC}} \$
If we say the line is lossless with no attenuation then that means it has no resistance. So \$ R=0 \$ and \$ G=0 \$ and we get:
\$Z_0 = \sqrt{\dfrac{jwL}{jwC}} \$
It doesn't matter if the line is 1cm, 1m, 1km or infinitely long (*well technically short lines do matter in some cases). Why? because as long as the impedance is the same the wave will travel unimpeded. If you start a wave on one end it will continue to to travel indefinitely until it reaches a section with an unmatched impedance. With matched impedance you have maximum power transfer.
This is why the length doesn't matter:
Without getting too much in the derivation look at this example: Lets say my transmission media impedance is 50Ω. The more sections I add, I still have 50Ω looking into each section and out of each section. The source still sees 50Ω's in each case. However one key difference is the length, if I send a wave down the transmission line, it takes longer and longer the more sections I add. So if I add an infinite number of sections the wave will keep traveling down the line, it never gets attenuated by resistance and never loses energy.

There is a medium that does this, its called free space. And its characteristic impedance is 377Ω, if you send a wave in free space it goes forever at the speed of light.
\$Z_0 = \sqrt{\dfrac{jwL}{jwC}} = \sqrt{\dfrac{\mu_0}{\epsilon_0}} \$