"She came back to the apartment but I was no longer there."
Translation:היא חזרה אל הדירה אבל כבר לא הייתי שם.
Think of כבר-לא as a set phrase meaning "no longer". Then any time somebody has stopped doing something (or in this case, being somewhere), we will always say כבר לא before the verb.
When כבר has its positive meaning of "already", its position can be a bit more flexible. Usually -- but not always -- Duolingo will guide us into a suitable word order, often by deploying an ugly and unnatural-sounding word order in the English.
Hope that helps?