It is, but it depends on a few things, one of whichbis mwntioned above. In areas where landline numbers are in high demand and on the verge of not meering demand for numbers. The number might not be possible to port. Some rural exchanges are also not possible to port. If T-Mobile does not offer E911 service for the area where your landline is, then you can not port your number to T-Mobile.
The FCC's site has a list of area codes and other reasons why a landline can not be ported. More than likely though, your number should be possible to port.