A charity whose plans to turn an office block in Swindon into flats were turned down earlier this year has tried again, and this time has been successful.