You must consider that the command extends works in 2d, then on the xy work plane.
the only way to make it work vertically is to rotate the worktop.
simply rotate the ucts.
Alternatively, the fastest method, is to select the line, move the pointer to the end you need to stretch (without clicking) and wait for the menu to appear with the two elongation options. the first voice allows you to deform the line but risk losing the verticality while the second allows you to stretch the line while keeping its direction.
Now just select any point of the plan where you want your line to arrive (it must be a parallel xy worktop).