I spent $64K remodeling a rental property in 2017, I sold the property in 2018. How can I take the entire amount against the sales profit?

I spent $64K remodeling rental prop in 2017. I filed schedule E and form 8582 which allowed me to deduct $25K of that; however, i did not need to use the $25K to avoid taxes. I sold the property in 2018. I have a sales profit. i can refile 2017 return if necessary. How can I claim the entire remodel cost against the sales profit?