The bill passed the House by a vote of 281-140 and will next move to the Senate, where lawmakers had sought a bigger boost in defense spending than the current measure allows.