If a congregation sells a plot of land (that was originally intended to build a building), is it unscriptural if it makes a profit?
The congregation purchased the land for the intent of building a building and for whatever reason the plan did not work out (as sometimes happens). Since the land is no longer needed, then it is sold. But between those two times, land values change. Inflation happens and the value of land changes as the population increases in an area. Therefore, while the land might sell for more in dollar amount, it might not be all that much different in purchasing power.
Churches should not be buying and selling land as investments, but this isn't the case you are presenting.