The main purpose of this legislation is to prevent certain individuals and businesses from purchasing real estate that is located near specific federal lands in the United States. The focus is particularly on restricting purchases by nationals of the People's Republic of China, which the bill aims to address due to concerns about national security and foreign influence.