Yes you can freeze fresh uncooked ham and it will last up to 6 months in the freezer.
If the ham has been cooked then you can still freeze the cooked ham however it should be eaten within 2 to 3 months to be fresh enough.
I freeze fresh ham all the time and it's lasted me 6 months even though most times I eat the ham before 6 months.