"Oji-san"/"Oba-san" are indeed honorifics for someone who is substantially older than you and that is close to you. If they're closer in age, you'd use "Onii-san"/"Onee-san." It's like if you're in a job, the person older than you/more experienced by a lot is usually called "sensei" out of respect, and if they're not older than you but have more experience or are around the same age, they're called "senpai."
It's a metaphorical kind of thing more than a literal blood-related association.