Your post did not mention the style of a new barn ? Is it timberframe ?
The cost trade off exercise is pretty straight forward.
Consider the foundation a fixed number.
Cost the new construction from a reputable builder on a turn key basis including all necessary permits. This give you a number to work with in addition to the foundation figure.
Get the old barn surveyed by a competent TFramer to fix any repair costs and see if it is worth the price asked before you commit to buy. Find out from your permit authority what you need for reassembly of an existing structure.
Add a 5 man crew for a week for disassembly plus probably 2 crane days. Fix the rental cost of two big box trailers and their movement to the new site. If in the process of disassembly you tag each stick then reassembly is facilitated.
Add the cost of the same five man crew for a week and two crane days. Don't forget to insure the world until the barn is up on the new location. Add the cost of new roofing. Compare the aggreate costs and you have your answer.
If a new barn is 50% or more costly then your decision is kinda self forming.