Illegal miner sentenced to two years imprisonment