How to make a line an exact size without changing the size of the whole object
In your pictured example I would select the end vertex, grab it and use vertex snapping to put it on top of the next vertex to the right.

Without changing my selection I would now grab it again, lock movement to the Y axis and type in how long I want it to be (you may need to use a negative value if you are moving towards -Y).