Fundamentally you need to change the culture of the team. The first step is to establish a team - in the situation you are describing there is no real team - just a bunch of people waiting for a cheque every month, a new job or being told that this job no longer exists. You need to figure out if there is a core purpose that some or ideally most of the people in the team will sign up to (with you - if you aren't "in" then they can't be), which will deliver for your stakeholders. Then you have to orientate the team to deliver this, some of them won't come along, some of them can't. You will have to do a lot of coaching with some of the ones that would like to.
The big question : what is the core purpose that your team will adopt and which will change how they work and what they will do?
Ask. Ask them.