Ticket to ride end of game dilemma
It sounds as though you have misunderstood how playing train cards to claim routes works.
On your turn, you can either draw train cards, draw destination tickets, or &quot;claim a route&quot;. A &quot;route&quot; is the spaces between any 2 adjacent cities; routes are from 1 to 6 trains long. You can claim any route that is still available if you have the correct train cards to pay for it; you don't have to have a matching destination ticket or anything like that.
Importantly, you can only claim 1 route at a time, so for example you would not be able to claim Los Angeles to New York on a single turn, even if you have that destination ticket and enough train cards in your hand to play all of those trains. Instead, a single turn would be for example playing 2 green cards to claim New York to Pittsburgh, and then scoring 2 points because that's what a 2-length route is worth.
So in your example, someone with 8 train cars will always have a route they can claim. Even if they can't finish their destination ticket with only 8 trains, they can still play those trains on the board for points, 1 route at a time.
From the rules:

The object of the game is to score the highest number of total points. Points can be scored by:

Claiming a Route between two adjacent cities on the map;



A player may claim any open route on the board. He is never required to connect to any of his previously played routes. A player may only claim a maximum of one route, hence connect two adjacent cities, never more, on his turn.