Yes it is safe to freeze food in aluminum foil.
When freezing food in aluminum foil it is safe to do so but you should use the heavy duty aluminum foil instead of the regular light duty aluminum foil.
The lightweight aluminum foil is prone to getting torn and letting air into the food such as the meat which can cause freezer burn.
However if you use the heavy duty aluminum foil the aluminum foil will not tear as easy and will prevent air from getting into the food.
If you only have lightweight aluminum foil to freeze your food in then make sure to wrap the food in the aluminum foil at least twice.
That will increase the strength and thickness of the lightweight aluminum foil and prevent it from tearing as easy.