The calculated distance (air line) between Barcelona and Huesca is approximately 142 miles respectively 229 kilometers.
By car or train, the actual journey to Huesca is certainly longer, as only the direct route (as the crow flies) between Barcelona and Huesca has been calculated here.