if i put $20,000 of my own inheretance into a house purchase down payment. could i claim any right to take the first $20,000 out of the sale when it closes? bought house when married, selling house now that separated for 18 months.

You can try, however, your ex can counter that the your 20K was a gift to the marriage

Simple answer is NO. The 20k is joint property.

When a person takes separate property or assets and converts it to marital property, there is a presumption that it was a gift to the marriage, but there are ways to rebut this presumption.