The Ergodic Queue Length Distribution for Queueing Systems with Finite Capacity