A New Jersey company that bought a property for $4.7 million after obtaining approval to demolish an uninhabitable farmhouse on the land and use the property for industrial purposes owes the state’s so-called mansion tax on the purchase, the state Tax Court ruled Tuesday.