"seems probably illegal and more like a robbery. " Yes, it would be robbery/ theft, a felony.
"by the way what is the law for finding something valuable on somone elses property that they had no idea existed? is it theirs anyways? " Yes, it is theirs under any circumstances, especially if it is inside a building.
I have detected at historical places, and always got a signed, written contract/ agreement in advance. In your case I would do the same, offer them an equal split, rights to publish the story, as that always helps them to draw more visitors, and offer to display the treasure, or a replica of the treasure, at the site. Say nothing at all about the location, whether inside or out, how much, what type.
"contact a lawyer in that state and find out the best way to go about" making the lawyer rich and you wearing getting shaft. NEVER TRUST A LAWYER!!!
Bill has the best advice. If that doesn't work, you could try offering some free professional service they are in need of, to get you inside, and able to verify somehow that what you believe to be there actually is. Then offer a contract, and offer 1, 5, or $10,000.00 on the side in cash if they sign. Or whatever amount you can swing. Once you have the contract, it's yours. You don't even need to let them know of the find if you possibly can help it, because as sure as the grass is green you wil end up in court or prison holding... you know what.
Deception? No, it is knowledge, skill, luck, and maybe a few other things. Knowledge is power, knowledge is valuable. It's done every day all over the world, everyone capitalizes on theirs skills and negotiates the best deal they possibly can for themselves. Here it's called the great American Dream. Go for it, and good luck!