A former petrol station site could be turned into more than 40 flats for elderly people.