Both sentences have the same meaning. Personally, I would change "out of" to "outside".
Student or Learner
1. The airport is 10km from the city.
2. The airport is 10km out of the city.
A. Are the meaning of the above sentences identical?
B. Are from and out of interchangeable in the above sentences?
I wouldn't say it's an error, but out of doesn't sound natural to me- I wouldn't use it.