Yes masturbation is a sin, because it causes lust, and for other reasons:
Matthew 5:28 But I say unto you, That whosoever looketh on a woman to lust after her hath committed adultery with her already in his heart.
Genesis 38:8 And Judah said unto Onan, Go in unto thy brother's wife, and marry her, and raise up seed to thy brother.
9 And Onan knew that the seed should not be his; and it came to pass, when he went in unto his brother's wife, that he spilled it on the ground, lest that he should give seed to his brother.
10 And the thing which he did displeased the LORD: wherefore he slew him also.
We can see from these that masturbation is indeed a sin - though note that Onan's sin was not masturbation but the practise of a form of rudimentary contraception. The principle still applies, though.
/Lucilius
PS If it says "came to but" in the scripture from Genesis, that is not intentional, the board seems to have changed what it says - it should say "came to pass".