The legislation, already approved by the Senate, cleared the House and now heads to President Donald Trump for his signature.