Anybody know this movie??

I saw it YEARS ago and for the life of me I can’t remember and it’s killing me.

All I remember is it took place in a rainforest(?) or something and these people lived up in the trees? I think this woman’s husband becomes ill or something and a her neighbor or husband friend has feelings for her? (TMI. - he ends up eating her out or having sex with her) but that’s all I can remember. I think her husband ends up dying or something.

It’s not “The Beach”.

It’s not that, this movie came out in early 2000’s or 90’s.