An H-2B visa enables foreign workers to come to the United States for a temporary length of time in order to work in a temporary position, usually for seasonal work. The most important part of the H-2B visa is that it is for a temporary position and nothing else. This means that your position is not permanent, and it ceases to be in existence after the expiration of the set time period.
While your H-2B visa enables you to work in the U.S., unfortunately, this visa or the job will not allow you to have permanent residence in the United States. However, it is possible to become eligible for and obtain a green card while you are in the United States with an H-2B visa. This is made possible when you get the services of an immigration lawyer.