Longing for someone evolved from long, as in length, around 1000 AD.
Around 1300 AD, long began to define a period of time because it seemed forever for someone to travel a great distance when a donkey cart was rapid transit.
In this day of jet travel, yearning or longing for someone who is far away isn’t the same, because you can always call long distance.