You asked for life, and I gave to him, length of days, forever.
Dovid Hamelech said, to Hashem “As I was chased out of Eretz Yisrael from Shaul and I would pray to you with this request: אתהלך לפני ה’ בארצות החיים, May I walk before Hashem in the lands of the living? Dovid Hamelech’s request for life was a prayer to Hashem to serve Him in Eretz Yisrael! 
Hashem restored him to Eretz Yisrael.
Length of days is referring to the Throne of Dovid Hashem established and prepared for his kingdom forever. It also is referring to the reality of דוד מלך ישראל חי וקיים, Dovid the King of Israel, is alive and endures.
I think we can use this prayer to daven for Eretz Yisrael, even in Galus we must constantly seek life, to serve Hashem in Eretz Yisrael as Dovid Hamelech taught us to do.
We can use this tefillah in response to the hostages, and all of Klal Yisrael that are hostages in our own unique ways, to not be satisfied until we are fully redeemed and are all gathered together and restored to Eretz Yisrael.
When things seem dismal and very difficult, we can remind ourselves of the truth that the enemies will fall and we are promised by Hashem: דוד מלך ישראל חי וקיים.