You have to perform an alignment first. Phangorn use phylogenetic estimation and this requires a precise alignment position to track homologous nucleotide mutation. Maximum likelihood theory will assess the probability of a given tree for each homologous nucleotide site, if they are not alignment it can't do it and will violate the assumptions of phylogeny.
If the sequences are different lengths, which it means both nucleotide and indel ('-') sites, it means there hasn't been or there is an error with the alignment. I use muscle
these days having previously used clustalo
. Its really easy to use and easily configures on a linux server and its super quick. If you get stuck let me know.
I had a look at your alignment and can verify it hasn't been aligned.