Yes. when you began renting the property, you should have allocated amounts to both since land can't be depreciated. You will do it again at sale. The easiest way is to prorate with the same percentage, unless either the land or the building's Fair Market Value has significantly increased but the other asset has not.
If you rented the property in 2017, go through the interview process, indicating the sale. (See the attached screenshot below. Click to enlarge.) Update for 2017.
If you did not rent in 2017, enter in Sales of Business Property. You will need to enter the depreciation taken over the rental time period.