Yes, the length does matter. I have directly compared a 1m and a 2m long Lessloss C-marc power cords, both previously burned in. The shorter cable had an audibly different tonal balance, more tilted towards treble. I also own 2 OCC copper power cables from Clearer Audio, a lesser known British boutique brand, a 1m long one and an otherwise identical 2.5m one. The sound is different in more than one way and there is no clear winner. In a third case, again with some Clearer Audio cords, a 2m power cord has stronger bass and treble than the 1m cord and seems preferable to me.
I've never heard two audio cables of any kind (interconnect, USB cable etc.) to sound the same regardless of their length. If I were buying a power cord and I had to chose a length without being able to audition first I'd probably go for 2 meters or so.