A Calabasas developer is buying the former Getty Oil Co. headquarters on Wilshire Boulevard in Los Angeles for more than $20 million and plans to transform it into an upscale apartment building.