So David sent and inquired about the woman. The Bible is clear that this episode and its consequences make up the worst sin in King David's life. David and Bathsheba were the ancestors of Jesus Christ. By God's design, men are attracted to women and women are attracted to men. There is no SIN in being attracted, even after marriage.
Attraction is merely the temptation.
Obviously, adultery is sin. It appears only four times in the New Testament. We can find much practical information in Proverbs. Though this is written from a father to a son, it applies equally to women and how they, too, can avoid sexual immorality. To deliver you from the immoral woman, From the seductress who flatters with her words, Who forsakes the companion of her youth, And forgets the covenant of her God.