Nearly all House Democratic lawmakers voted against a bill Tuesday that would prevent men from competing in women’s sports.