B seems to be the best answer. "that forbids... from raising" is the right combination. "For the next 3 years" should be joined with the legislation not with "link consumers to the internet".
Congress has enacted legislation
that forbids state and local governments for the next three years from raising taxes on connections that link consumers to the Internet
Congress has enacted legislation forbidding state and local governments from raising taxes on connections that link consumers to the Internet for the next three years.
a)forbidding state and local governments from raising taxes on connections that link consumers to the Internet for the next three years
b)that forbids state and local governments for the next three years from raising taxes on connections that link consumers to the Internet
c)that for the next three years forbids state and local governments to raise taxes on connections that link consumers to the Internet
d)forbidding for the next three years to state and local governments the raising of taxes on connections that link consumers to the Internet
e)that forbids for the next three years state and local governments from raising taxes on connections that link consumers to the Internet