Life insurance is a new contract not known in the history of Fiqh. Muslim scholars have different opinions regarding this kind of insurance.
Responding to the question, Dr. Monzer Kahf, Scholar in Islamic Economics & Financial Expert, states the following:

In the circles of contemporary Shari’ah scholars, there are three opinions about life insurance. They all recognize that it is a new contract not known in the history of Fiqh. A minority consider it haram and with all kinds of argument against it including Riba, gambling, gharar and speculation on the will of Allah. This view does not carry much weight.
the second view is that it contains gharar because no one knows whether the liability of the insurer (the company) will ever materialize nor when it will, if ever. This is a serious gharar that leads to a major defect in the contract. It is therefore forbidden.
the third opinion is presented by the late Sheikh Mustafa al Zarka. He argued that the gharar in the contract is remedied by the fact that it is a contract based on overwhelming statistical knowledge and the application of the theory of probability. With this in mind, there is no gharar on the part of the insurer and the contract is permissible with two conditions: that it contains no Riba clause and that its subject (insured thing) be legitimate.

These two conditions rule out regular fixed return life insurance because the value of the policy is the outcome of investment premiums at a compounded rate of interest, (while variable – return life is permissible if the funds are invested in the Shari’ah approved stocks or mutual funds). They also rule out insuring a prohibited activity such as casinos.
The advocators of the second opinion argue that the gharar problem applies only in exchange contracts. If the contract is modified and restructure on the basis of cooperation or mutuality, where there will be an association of the insured instead of a profit motivated insurer company, the gharar is then tolerated. This is so because the relation between the association and its members become based on contribution or tabarru’ rather than exchange and a tabarru’ can accommodate certain conditions ( i.e., that the association compensate in case a hazardous event happens). On the basis of this all the “Islamic insurance companies” were established.

In this regards, al-Zarka adds, that if a mutual or cooperative insurance exists he prefers it to profit motivated insurance out of his respect to the opinion of opponents. There is an old argument (from the 1950s), even by those who oppose insurance, that whenever insurance is forced by law, one must do it and one is excused, from the Shari’ah point of view. This include car insurance, social security, workman compensation, and employer’s imposed insurance if it is not optional for the employee to this we add another element that if the insurance provided by the employer is paid completely from the employer, i.e., given as a fringe benefit without deducting any part of the premium from the pay checks, then it is a kind of grant from the employer and if a hazard happens the paid policy amount is halal because it is an outcome of the grant.
now think for yourself: if your life insurance is only term life, you may apply the opinion of Sheikh al-Zarka, and if it is imposed by employer, you also have room to accommodate, and if it is a grant from employer it is also tolerated. Otherwise you need to see the specifics of the contract you have and determine, in the light of the above briefing, whether you keep or seek to withdraw from it.