I have also found myself in this position. The problem with all of these sorts of situations is that honesty is the best policy, but also being honest in this type of situation can hurt you. Even if it's not your fault, saying something like "my contract was not renewed because it was an office job and office lease expired" comes off to an employer as "my contract was not renewed because my contract expired and I was not skilled enough to have the company retain me in a different role". It doesn't really matter what you say, that's what an employer will hear, and that's unfortunate.
Further unfortunate is what user @Heinzi said in a comment, that being that since you have so many short jobs on your resume (this being your third), that many companies will disqualify you on that basis alone and not even give you a chance. Unfortunately, many companies do this and the industry standard is that it is a one-way street, where the company can disqualify the applicant on this basis but it is frowned upon for the applicant to disqualify the company on this basis; moreover the applicant is expected to be forthcoming with this sort of information, while the company is under no requirement to be forthcoming with similar data e.g. about turnover rates. You will have to deal with this, and unfortunately there is no good way of doing so.
The bad news is, there is no really good one-size-fits-all solution to your problem that I can simply give you and say "here, do this". I got incredibly lucky to find a company that was very good in terms of giving me interesting work to do, overlooking my resume issues, and having great people to work with. However, it was just plain old dumb luck and not at all strategy or skill. You're going to have to be lucky.
One thing you may want to ask about going forward, when you are going through interview processes, is regarding the company's turnover rate. Ask them specific questions regarding how many people have quit within the last month and why, and how many people they have fired and why. You can explain that you need this information because you don't want any more of these short positions on your resume and you want to make sure you're joining a stable company that's going to keep you engaged for the long term. You should use this information to guide your acceptance of whatever job offers you get, and not join companies with high turnover rates in the future.